| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0240461 commit 2d2fe53
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,7 +95,7 @@ public class Runtime | |||
| 95 | 95 | /// </summary> | |
| 96 | 96 | private const string PyUnicodeEntryPoint = "PyUnicodeUCS4_"; | |
| 97 | 97 | #elif UCS2 | |
| 98 | - public const int _UCS = 2; | ||
| 98 | + internal const int _UCS = 2; | ||
| 99 | 99 | ||
| 100 | 100 | /// <summary> | |
| 101 | 101 | /// EntryPoint to be used in DllImport to map to correct Unicode | |
@@ -110,33 +110,33 @@ public class Runtime | |||
| 110 | 110 | // We needs to replace all public constants to static readonly fields to allow | |
| 111 | 111 | // binary substitution of different Python.Runtime.dll builds in a target application. | |
| 112 | 112 | ||
| 113 | - public const string pyversion = _pyversion; | ||
| 114 | - public const string pyver = _pyver; | ||
| 113 | + public readonly string pyversion = _pyversion; | ||
| 114 | + public readonly string pyver = _pyver; | ||
| 115 | 115 | ||
| 116 | 116 | #if PYTHON27 | |
| 117 | 117 | internal const string _pyversion = "2.7"; | |
| 118 | 118 | internal const string _pyver = "27"; | |
| 119 | 119 | #elif PYTHON33 | |
| 120 | - public const string _pyversion = "3.3"; | ||
| 121 | - public const string _pyver = "33"; | ||
| 120 | + internal const string _pyversion = "3.3"; | ||
| 121 | + internal const string _pyver = "33"; | ||
| 122 | 122 | #elif PYTHON34 | |
| 123 | - public const string _pyversion = "3.4"; | ||
| 124 | - public const string _pyver = "34"; | ||
| 123 | + internal const string _pyversion = "3.4"; | ||
| 124 | + internal const string _pyver = "34"; | ||
| 125 | 125 | #elif PYTHON35 | |
| 126 | - public const string _pyversion = "3.5"; | ||
| 127 | - public const string _pyver = "35"; | ||
| 126 | + internal const string _pyversion = "3.5"; | ||
| 127 | + internal const string _pyver = "35"; | ||
| 128 | 128 | #elif PYTHON36 | |
| 129 | - public const string _pyversion = "3.6"; | ||
| 130 | - public const string _pyver = "36"; | ||
| 129 | + internal const string _pyversion = "3.6"; | ||
| 130 | + internal const string _pyver = "36"; | ||
| 131 | 131 | #elif PYTHON37 // TODO: Add `interop37.cs` after PY37 is released | |
| 132 | - public const string _pyversion = "3.7"; | ||
| 133 | - public const string _pyver = "37"; | ||
| 132 | + internal const string _pyversion = "3.7"; | ||
| 133 | + internal const string _pyver = "37"; | ||
| 134 | 134 | #else | |
| 135 | 135 | #error You must define one of PYTHON33 to PYTHON37 or PYTHON27 | |
| 136 | 136 | #endif | |
| 137 | 137 | ||
| 138 | 138 | #if MONO_LINUX || MONO_OSX // Linux/macOS use dotted version string | |
| 139 | - internal const string dllBase = "python" + pyversion; | ||
| 139 | + internal const string dllBase = "python" + _pyversion; | ||
| 140 | 140 | #else // Windows | |
| 141 | 141 | internal const string dllBase = "python" + _pyver; | |
| 142 | 142 | #endif | |
@@ -159,9 +159,9 @@ public class Runtime | |||
| 159 | 159 | public static readonly string PythonDLL = _PythonDll; | |
| 160 | 160 | ||
| 161 | 161 | #if PYTHON_WITHOUT_ENABLE_SHARED | |
| 162 | - public const string _PythonDll = "__Internal"; | ||
| 162 | + internal const string _PythonDll = "__Internal"; | ||
| 163 | 163 | #else | |
| 164 | - public const string _PythonDll = dllBase + dllWithPyDebug + dllWithPyMalloc; | ||
| 164 | + internal const string _PythonDll = dllBase + dllWithPyDebug + dllWithPyMalloc; | ||
| 165 | 165 | #endif | |
| 166 | 166 | ||
| 167 | 167 | public static readonly int pyversionnumber = Convert.ToInt32(_pyver); | |
@@ -708,7 +708,7 @@ public static extern int Py_Main( | |||
| 708 | 708 | [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |
| 709 | 709 | internal static extern IntPtr PyEval_EvalCode(IntPtr co, IntPtr globals, IntPtr locals); | |
| 710 | 710 | ||
| 711 | - [DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)] | ||
| 711 | + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | ||
| 712 | 712 | internal static extern IntPtr Py_CompileString(string code, string file, IntPtr tok); | |
| 713 | 713 | ||
| 714 | 714 | [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |
@@ -1224,7 +1224,7 @@ int size | |||
| 1224 | 1224 | ||
| 1225 | 1225 | internal static IntPtr PyUnicode_FromUnicode(string s, int size) | |
| 1226 | 1226 | { | |
| 1227 | - return PyUnicode_FromKindAndData(UCS, s, size); | ||
| 1227 | + return PyUnicode_FromKindAndData(_UCS, s, size); | ||
| 1228 | 1228 | } | |
| 1229 | 1229 | ||
| 1230 | 1230 | [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments