From b8165d2c1b391f8ce34b5cc4f4e5e987044e0ece Mon Sep 17 00:00:00 2001 From: dse Date: Sun, 27 Aug 2017 11:20:50 +0400 Subject: [PATCH 1/6] Interop fix for Py_ssize_t methods (it's produces problems only on NetCoreApp 2.0). --- CHANGELOG.md | 1 + src/embed_tests/TestPySequence.cs | 6 +- src/runtime/exceptions.cs | 2 +- src/runtime/runtime.cs | 263 ++++++++++++++++++++++++------ 4 files changed, 220 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d408a8d1..a297bb4b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. ### Fixed +- Fixed interop methods with Py_ssize_t. NetCoreApp 2.0 is more sensitive than net40 and requires this fix. - Fixed Visual Studio 2017 compat (#434) for setup.py - Fixed crash on exit of the Python interpreter if a python class derived from a .NET class has a `__namespace__` or `__assembly__` diff --git a/src/embed_tests/TestPySequence.cs b/src/embed_tests/TestPySequence.cs index 1e3ebf144..7c175b1ce 100644 --- a/src/embed_tests/TestPySequence.cs +++ b/src/embed_tests/TestPySequence.cs @@ -69,10 +69,8 @@ public void TestRepeat() PyObject actual = t1.Repeat(3); Assert.AreEqual("FooFooFoo", actual.ToString()); - // On 32 bit system this argument should be int, but on the 64 bit system this should be long value. - // This works on the Framework 4.0 accidentally, it should produce out of memory! - // actual = t1.Repeat(-3); - // Assert.AreEqual("", actual.ToString()); + actual = t1.Repeat(-3); + Assert.AreEqual("", actual.ToString()); } [Test] diff --git a/src/runtime/exceptions.cs b/src/runtime/exceptions.cs index 9023cfcfa..743b5416f 100644 --- a/src/runtime/exceptions.cs +++ b/src/runtime/exceptions.cs @@ -276,7 +276,7 @@ public static void SetError(Exception e) /// public static bool ErrorOccurred() { - return Runtime.PyErr_Occurred() != 0; + return Runtime.PyErr_Occurred() != IntPtr.Zero; } /// diff --git a/src/runtime/runtime.cs b/src/runtime/runtime.cs index abd0661a4..9429c1a8f 100644 --- a/src/runtime/runtime.cs +++ b/src/runtime/runtime.cs @@ -420,7 +420,7 @@ internal static int AtExit() /// internal static void CheckExceptionOccurred() { - if (PyErr_Occurred() != 0) + if (PyErr_Occurred() != IntPtr.Zero) { throw new PythonException(); } @@ -902,8 +902,13 @@ internal static int PyObject_Compare(IntPtr value1, IntPtr value2) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern int PyObject_Not(IntPtr pointer); - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyObject_Size(IntPtr pointer); + internal static int PyObject_Size(IntPtr pointer) + { + return (int) _PyObject_Size(pointer); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyObject_Size")] + private static extern IntPtr _PyObject_Size(IntPtr pointer); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyObject_Hash(IntPtr op); @@ -1133,26 +1138,61 @@ internal static bool PyFloat_Check(IntPtr ob) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern bool PySequence_Check(IntPtr pointer); - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PySequence_GetItem(IntPtr pointer, int index); + internal static IntPtr PySequence_GetItem(IntPtr pointer, int index) + { + return PySequence_GetItem(pointer, (IntPtr) index); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PySequence_SetItem(IntPtr pointer, int index, IntPtr value); + private static extern IntPtr PySequence_GetItem(IntPtr pointer, IntPtr index); + + internal static int PySequence_SetItem(IntPtr pointer, int index, IntPtr value) + { + return PySequence_SetItem(pointer, (IntPtr)index, value); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PySequence_DelItem(IntPtr pointer, int index); + private static extern int PySequence_SetItem(IntPtr pointer, IntPtr index, IntPtr value); + + internal static int PySequence_DelItem(IntPtr pointer, int index) + { + return PySequence_DelItem(pointer, (IntPtr)index); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PySequence_GetSlice(IntPtr pointer, int i1, int i2); + private static extern int PySequence_DelItem(IntPtr pointer, IntPtr index); + + internal static IntPtr PySequence_GetSlice(IntPtr pointer, int i1, int i2) + { + return PySequence_GetSlice(pointer, (IntPtr)i1, (IntPtr)i2); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PySequence_SetSlice(IntPtr pointer, int i1, int i2, IntPtr v); + private static extern IntPtr PySequence_GetSlice(IntPtr pointer, IntPtr i1, IntPtr i2); + + internal static int PySequence_SetSlice(IntPtr pointer, int i1, int i2, IntPtr v) + { + return PySequence_SetSlice(pointer, (IntPtr) i1, (IntPtr) i2, v); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PySequence_DelSlice(IntPtr pointer, int i1, int i2); + private static extern int PySequence_SetSlice(IntPtr pointer, IntPtr i1, IntPtr i2, IntPtr v); + + internal static int PySequence_DelSlice(IntPtr pointer, int i1, int i2) + { + return PySequence_DelSlice(pointer, (IntPtr) i1, (IntPtr) i2); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PySequence_Size(IntPtr pointer); + private static extern int PySequence_DelSlice(IntPtr pointer, IntPtr i1, IntPtr i2); + + internal static int PySequence_Size(IntPtr pointer) + { + return (int) _PySequence_Size(pointer); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PySequence_Size")] + private static extern IntPtr _PySequence_Size(IntPtr pointer); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern int PySequence_Contains(IntPtr pointer, IntPtr item); @@ -1160,14 +1200,24 @@ internal static bool PyFloat_Check(IntPtr ob) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PySequence_Concat(IntPtr pointer, IntPtr other); + internal static IntPtr PySequence_Repeat(IntPtr pointer, int count) + { + return PySequence_Repeat(pointer, (IntPtr) count); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PySequence_Repeat(IntPtr pointer, int count); + private static extern IntPtr PySequence_Repeat(IntPtr pointer, IntPtr count); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern int PySequence_Index(IntPtr pointer, IntPtr item); - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PySequence_Count(IntPtr pointer, IntPtr value); + internal static int PySequence_Count(IntPtr pointer, IntPtr value) + { + return (int) _PySequence_Count(pointer, value); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PySequence_Count")] + private static extern IntPtr _PySequence_Count(IntPtr pointer, IntPtr value); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PySequence_Tuple(IntPtr pointer); @@ -1200,26 +1250,46 @@ internal static IntPtr PyString_FromString(string value) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyBytes_FromString(string op); - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyBytes_Size(IntPtr op); + internal static int PyBytes_Size(IntPtr op) + { + return (int) _PyBytes_Size(op); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyBytes_Size")] + private static extern IntPtr _PyBytes_Size(IntPtr op); internal static IntPtr PyBytes_AS_STRING(IntPtr ob) { return ob + BytesOffset.ob_sval; } + internal static IntPtr PyString_FromStringAndSize(string value, int size) + { + return _PyString_FromStringAndSize(value, (IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyUnicode_FromStringAndSize")] - internal static extern IntPtr PyString_FromStringAndSize( + internal static extern IntPtr _PyString_FromStringAndSize( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string value, - int size + IntPtr size ); + internal static IntPtr PyUnicode_FromStringAndSize(IntPtr value, int size) + { + return PyUnicode_FromStringAndSize(value, (IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyUnicode_FromStringAndSize(IntPtr value, int size); + private static extern IntPtr PyUnicode_FromStringAndSize(IntPtr value, IntPtr size); #elif PYTHON2 + internal static IntPtr PyString_FromStringAndSize(string value, int size) + { + return PyString_FromStringAndSize(value, (IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyString_FromStringAndSize(string value, int size); + private static extern IntPtr PyString_FromStringAndSize(string value, IntPtr size); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyString_AsString(IntPtr op); @@ -1240,11 +1310,16 @@ internal static bool PyUnicode_Check(IntPtr ob) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyUnicode_FromEncodedObject(IntPtr ob, IntPtr enc, IntPtr err); + internal static IntPtr PyUnicode_FromKindAndData(int kind, string s, int size) + { + return PyUnicode_FromKindAndData(kind, s, (IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyUnicode_FromKindAndData( + private static extern IntPtr PyUnicode_FromKindAndData( int kind, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UcsMarshaler))] string s, - int size + IntPtr size ); internal static IntPtr PyUnicode_FromUnicode(string s, int size) @@ -1252,8 +1327,13 @@ internal static IntPtr PyUnicode_FromUnicode(string s, int size) return PyUnicode_FromKindAndData(_UCS, s, size); } - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyUnicode_GetSize(IntPtr ob); + internal static int PyUnicode_GetSize(IntPtr ob) + { + return (int)_PyUnicode_GetSize(ob); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyUnicode_GetSize")] + private static extern IntPtr _PyUnicode_GetSize(IntPtr ob); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyUnicode_AsUnicode(IntPtr ob); @@ -1269,16 +1349,26 @@ internal static IntPtr PyUnicode_FromUnicode(string s, int size) EntryPoint = PyUnicodeEntryPoint + "FromEncodedObject")] internal static extern IntPtr PyUnicode_FromEncodedObject(IntPtr ob, IntPtr enc, IntPtr err); + internal static IntPtr PyUnicode_FromUnicode(string s, int size) + { + return PyUnicode_FromUnicode(s, (IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = PyUnicodeEntryPoint + "FromUnicode")] - internal static extern IntPtr PyUnicode_FromUnicode( + private static extern IntPtr PyUnicode_FromUnicode( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UcsMarshaler))] string s, - int size + IntPtr size ); + internal static int PyUnicode_GetSize(IntPtr ob) + { + return (int) _PyUnicode_GetSize(ob); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = PyUnicodeEntryPoint + "GetSize")] - internal static extern int PyUnicode_GetSize(IntPtr ob); + internal static extern IntPtr _PyUnicode_GetSize(IntPtr ob); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = PyUnicodeEntryPoint + "AsUnicode")] @@ -1387,8 +1477,13 @@ internal static bool PyDict_Check(IntPtr ob) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern void PyDict_Clear(IntPtr pointer); - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyDict_Size(IntPtr pointer); + internal static int PyDict_Size(IntPtr pointer) + { + return (int) _PyDict_Size(pointer); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyDict_Size")] + internal static extern IntPtr _PyDict_Size(IntPtr pointer); //==================================================================== @@ -1400,20 +1495,40 @@ internal static bool PyList_Check(IntPtr ob) return PyObject_TYPE(ob) == PyListType; } + internal static IntPtr PyList_New(int size) + { + return PyList_New((IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyList_New(int size); + private static extern IntPtr PyList_New(IntPtr size); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyList_AsTuple(IntPtr pointer); + internal static IntPtr PyList_GetItem(IntPtr pointer, int index) + { + return PyList_GetItem(pointer, (IntPtr) index); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyList_GetItem(IntPtr pointer, int index); + private static extern IntPtr PyList_GetItem(IntPtr pointer, IntPtr index); + + internal static int PyList_SetItem(IntPtr pointer, int index, IntPtr value) + { + return PyList_SetItem(pointer, (IntPtr) index, value); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyList_SetItem(IntPtr pointer, int index, IntPtr value); + private static extern int PyList_SetItem(IntPtr pointer, IntPtr index, IntPtr value); + + internal static int PyList_Insert(IntPtr pointer, int index, IntPtr value) + { + return PyList_Insert(pointer, (IntPtr)index, value); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyList_Insert(IntPtr pointer, int index, IntPtr value); + private static extern int PyList_Insert(IntPtr pointer, IntPtr index, IntPtr value); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern int PyList_Append(IntPtr pointer, IntPtr value); @@ -1424,15 +1539,29 @@ internal static bool PyList_Check(IntPtr ob) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern int PyList_Sort(IntPtr pointer); - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyList_GetSlice(IntPtr pointer, int start, int end); + internal static IntPtr PyList_GetSlice(IntPtr pointer, int start, int end) + { + return PyList_GetSlice(pointer, (IntPtr) start, (IntPtr) end); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyList_SetSlice(IntPtr pointer, int start, int end, IntPtr value); + private static extern IntPtr PyList_GetSlice(IntPtr pointer, IntPtr start, IntPtr end); + + internal static int PyList_SetSlice(IntPtr pointer, int start, int end, IntPtr value) + { + return PyList_SetSlice(pointer, (IntPtr) start, (IntPtr) end, value); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyList_Size(IntPtr pointer); + private static extern int PyList_SetSlice(IntPtr pointer, IntPtr start, IntPtr end, IntPtr value); + internal static int PyList_Size(IntPtr pointer) + { + return (int) _PyList_Size(pointer); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyList_Size")] + private static extern IntPtr _PyList_Size(IntPtr pointer); //==================================================================== // Python tuple API @@ -1443,20 +1572,45 @@ internal static bool PyTuple_Check(IntPtr ob) return PyObject_TYPE(ob) == PyTupleType; } - [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyTuple_New(int size); + internal static IntPtr PyTuple_New(int size) + { + return PyTuple_New((IntPtr) size); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyTuple_GetItem(IntPtr pointer, int index); + private static extern IntPtr PyTuple_New(IntPtr size); + + internal static IntPtr PyTuple_GetItem(IntPtr pointer, int index) + { + return PyTuple_GetItem(pointer, (IntPtr) index); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyTuple_SetItem(IntPtr pointer, int index, IntPtr value); + private static extern IntPtr PyTuple_GetItem(IntPtr pointer, IntPtr index); + + internal static int PyTuple_SetItem(IntPtr pointer, int index, IntPtr value) + { + return PyTuple_SetItem(pointer, (IntPtr) index, value); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyTuple_GetSlice(IntPtr pointer, int start, int end); + private static extern int PyTuple_SetItem(IntPtr pointer, IntPtr index, IntPtr value); + + internal static IntPtr PyTuple_GetSlice(IntPtr pointer, int start, int end) + { + return PyTuple_GetSlice(pointer, (IntPtr)start, (IntPtr)end); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyTuple_Size(IntPtr pointer); + private static extern IntPtr PyTuple_GetSlice(IntPtr pointer, IntPtr start, IntPtr end); + + internal static int PyTuple_Size(IntPtr pointer) + { + return (int) _PyTuple_Size(pointer); + } + + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "PyTuple_Size")] + private static extern IntPtr _PyTuple_Size(IntPtr pointer); //==================================================================== @@ -1562,8 +1716,13 @@ internal static bool PyObject_TypeCheck(IntPtr ob, IntPtr tp) [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr PyType_GenericNew(IntPtr type, IntPtr args, IntPtr kw); + internal static IntPtr PyType_GenericAlloc(IntPtr type, int n) + { + return PyType_GenericAlloc(type, (IntPtr) n); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyType_GenericAlloc(IntPtr type, int n); + private static extern IntPtr PyType_GenericAlloc(IntPtr type, IntPtr n); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern int PyType_Ready(IntPtr type); @@ -1597,11 +1756,21 @@ internal static bool PyObject_TypeCheck(IntPtr ob, IntPtr tp) // Python memory API //==================================================================== + internal static IntPtr PyMem_Malloc(int size) + { + return PyMem_Malloc((IntPtr) size); + } + [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyMem_Malloc(int size); + private static extern IntPtr PyMem_Malloc(IntPtr size); + + internal static IntPtr PyMem_Realloc(IntPtr ptr, int size) + { + return PyMem_Realloc(ptr, (IntPtr) size); + } [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr PyMem_Realloc(IntPtr ptr, int size); + private static extern IntPtr PyMem_Realloc(IntPtr ptr, IntPtr size); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern void PyMem_Free(IntPtr ptr); @@ -1633,7 +1802,7 @@ internal static bool PyObject_TypeCheck(IntPtr ob, IntPtr tp) internal static extern void PyErr_NormalizeException(IntPtr ob, IntPtr val, IntPtr tb); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] - internal static extern int PyErr_Occurred(); + internal static extern IntPtr PyErr_Occurred(); [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] internal static extern void PyErr_Fetch(ref IntPtr ob, ref IntPtr val, ref IntPtr tb); From 6c51ed58d789a6f31689bbea19ecc1c539c11beb Mon Sep 17 00:00:00 2001 From: dse Date: Fri, 22 Sep 2017 03:33:45 +0400 Subject: [PATCH 2/6] PYTHONNET_INTEROP_FILE env var introduced to allow working with custom interop*.cs file inside IDE. --- src/runtime/Python.Runtime.15.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/Python.Runtime.15.csproj b/src/runtime/Python.Runtime.15.csproj index cfde0a127..7640b745c 100644 --- a/src/runtime/Python.Runtime.15.csproj +++ b/src/runtime/Python.Runtime.15.csproj @@ -32,6 +32,7 @@ $(DefineConstants);NETSTANDARD $(DefineConstants);TRACE;DEBUG $(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\ +<<<<<<< HEAD $(PYTHONNET_PY2_VERSION) PYTHON27 $(PYTHONNET_PY3_VERSION) @@ -40,6 +41,8 @@ UCS2 $(PYTHONNET_MONO_DEFINE_CONSTANTS) UCS4;MONO_LINUX;PYTHON_WITH_PYMALLOC +======= +>>>>>>> PYTHONNET_INTEROP_FILE env var introduced to allow working with custom interop*.cs file inside IDE. $(PYTHONNET_INTEROP_FILE) From ddffaf2d008d8b23b38ebf3dd519823f61b610cd Mon Sep 17 00:00:00 2001 From: dse Date: Fri, 22 Sep 2017 04:04:38 +0400 Subject: [PATCH 3/6] pdb generation improved for all conditions Net 4.0/NetStandard 2.0 x Debug/Release. --- src/runtime/Python.Runtime.15.csproj | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/runtime/Python.Runtime.15.csproj b/src/runtime/Python.Runtime.15.csproj index 7640b745c..9700862dd 100644 --- a/src/runtime/Python.Runtime.15.csproj +++ b/src/runtime/Python.Runtime.15.csproj @@ -48,6 +48,7 @@ false full +<<<<<<< HEAD true @@ -87,6 +88,47 @@ $(DefineConstants);PYTHON3;$(Python3Version);$(PythonWinDefineConstants);TRACE;DEBUG +======= + + + true + pdbonly + + + true + false + full + + + true + true + portable + + + + $(DefineConstants);PYTHON2;PYTHON27;UCS4 + + + $(DefineConstants);PYTHON3;PYTHON36;UCS4 + + + $(DefineConstants);PYTHON2;PYTHON27;UCS4;TRACE;DEBUG + + + $(DefineConstants);PYTHON3;PYTHON36;UCS4;TRACE;DEBUG + + + $(DefineConstants);PYTHON2;PYTHON27;UCS2 + + + $(DefineConstants);PYTHON3;PYTHON36;UCS2 + + + $(DefineConstants);PYTHON2;PYTHON27;UCS2;TRACE;DEBUG + + + $(DefineConstants);PYTHON3;PYTHON36;UCS2;TRACE;DEBUG +>>>>>>> pdb generation improved for all conditions Net 4.0/NetStandard 2.0 x Debug/Release. From f8dcbe87addac7adb533e801d25e2683824fb78c Mon Sep 17 00:00:00 2001 From: vpapakos Date: Tue, 3 Oct 2017 11:25:21 +0100 Subject: [PATCH 4/6] Missing ; in runtime.cs --- src/runtime/runtime.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/runtime.cs b/src/runtime/runtime.cs index 9429c1a8f..17fa50e9d 100644 --- a/src/runtime/runtime.cs +++ b/src/runtime/runtime.cs @@ -21,7 +21,7 @@ public static IntPtr LoadLibrary(string fileName) } #elif MONO_OSX private static int RTLD_GLOBAL = 0x8; - private const string NativeDll = "/usr/lib/libSystem.dylib" + private const string NativeDll = "/usr/lib/libSystem.dylib"; private static IntPtr RTLD_DEFAULT = new IntPtr(-2); public static IntPtr LoadLibrary(string fileName) From 7556ff295f9d45c1e51b7fae9803d35e433ae915 Mon Sep 17 00:00:00 2001 From: vasilios Date: Sun, 15 Oct 2017 20:29:39 +0100 Subject: [PATCH 5/6] Commented case-sensitive copy --- src/runtime/Python.Runtime.15.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Python.Runtime.15.csproj b/src/runtime/Python.Runtime.15.csproj index 9700862dd..a57f34ead 100644 --- a/src/runtime/Python.Runtime.15.csproj +++ b/src/runtime/Python.Runtime.15.csproj @@ -176,7 +176,7 @@ - + From e09749c2660f469bd64c2890926f7bff866e5cc0 Mon Sep 17 00:00:00 2001 From: vasilios Date: Tue, 28 Nov 2017 21:55:10 -0600 Subject: [PATCH 6/6] Fixed rebase conflicts --- src/runtime/Python.Runtime.15.csproj | 47 +--------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/src/runtime/Python.Runtime.15.csproj b/src/runtime/Python.Runtime.15.csproj index a57f34ead..cfde0a127 100644 --- a/src/runtime/Python.Runtime.15.csproj +++ b/src/runtime/Python.Runtime.15.csproj @@ -32,7 +32,6 @@ $(DefineConstants);NETSTANDARD $(DefineConstants);TRACE;DEBUG $(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\ -<<<<<<< HEAD $(PYTHONNET_PY2_VERSION) PYTHON27 $(PYTHONNET_PY3_VERSION) @@ -41,14 +40,11 @@ UCS2 $(PYTHONNET_MONO_DEFINE_CONSTANTS) UCS4;MONO_LINUX;PYTHON_WITH_PYMALLOC -======= ->>>>>>> PYTHONNET_INTEROP_FILE env var introduced to allow working with custom interop*.cs file inside IDE. $(PYTHONNET_INTEROP_FILE) false full -<<<<<<< HEAD true @@ -88,47 +84,6 @@ $(DefineConstants);PYTHON3;$(Python3Version);$(PythonWinDefineConstants);TRACE;DEBUG -======= - - - true - pdbonly - - - true - false - full - - - true - true - portable - - - - $(DefineConstants);PYTHON2;PYTHON27;UCS4 - - - $(DefineConstants);PYTHON3;PYTHON36;UCS4 - - - $(DefineConstants);PYTHON2;PYTHON27;UCS4;TRACE;DEBUG - - - $(DefineConstants);PYTHON3;PYTHON36;UCS4;TRACE;DEBUG - - - $(DefineConstants);PYTHON2;PYTHON27;UCS2 - - - $(DefineConstants);PYTHON3;PYTHON36;UCS2 - - - $(DefineConstants);PYTHON2;PYTHON27;UCS2;TRACE;DEBUG - - - $(DefineConstants);PYTHON3;PYTHON36;UCS2;TRACE;DEBUG ->>>>>>> pdb generation improved for all conditions Net 4.0/NetStandard 2.0 x Debug/Release. @@ -176,7 +131,7 @@ - +