Skip to content

Added side-by-side VS 2017 build with NetStandard 1.5 support. #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Build fix, lost renames performed.
  • Loading branch information
dse committed Apr 25, 2017
commit 49edf48b1bced0e82a8964a928fe11cf0869d3cd
44 changes: 22 additions & 22 deletions src/runtime/runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ internal static void Initialize()

#if PYTHON3
IntPtr dllLocal = IntPtr.Zero;
if (PythonDll != "__Internal")
if (_PythonDll != "__Internal")
{
NativeMethods.LoadLibrary(PythonDll);
NativeMethods.LoadLibrary(_PythonDll);
}
_PyObject_NextNotImplemented = NativeMethods.GetProcAddress(dllLocal, "_PyObject_NextNotImplemented");
#if !(MONO_LINUX || MONO_OSX)
Expand Down Expand Up @@ -644,7 +644,7 @@ internal static unsafe long Refcount(IntPtr op)
internal static extern IntPtr PyGILState_GetThisThreadState();

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Py_Main(
int argc,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StrArrayMarshaler))] string[] argv
Expand Down Expand Up @@ -833,7 +833,7 @@ internal static string PyObject_GetTypeName(IntPtr op)
internal static extern IntPtr PyObject_CallObject(IntPtr pointer, IntPtr args);

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern int PyObject_RichCompareBool(IntPtr value1, IntPtr value2, int opid);

internal static int PyObject_Compare(IntPtr value1, IntPtr value2)
Expand Down Expand Up @@ -893,7 +893,7 @@ internal static int PyObject_Compare(IntPtr value1, IntPtr value2)
internal static extern IntPtr PyObject_Str(IntPtr pointer);

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyObject_Str")]
internal static extern IntPtr PyObject_Unicode(IntPtr pointer);
#elif PYTHON2
Expand All @@ -910,7 +910,7 @@ internal static int PyObject_Compare(IntPtr value1, IntPtr value2)
//====================================================================

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyNumber_Long")]
internal static extern IntPtr PyNumber_Int(IntPtr ob);
#elif PYTHON2
Expand Down Expand Up @@ -950,19 +950,19 @@ internal static IntPtr PyInt_FromInt64(long value)
}

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyLong_FromLong")]
private static extern IntPtr PyInt_FromLong(IntPtr value);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyLong_AsLong")]
internal static extern int PyInt_AsLong(IntPtr value);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyLong_FromString")]
internal static extern IntPtr PyInt_FromString(string value, IntPtr end, int radix);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyLong_GetMax")]
internal static extern int PyInt_GetMax();
#elif PYTHON2
Expand Down Expand Up @@ -1175,25 +1175,25 @@ internal static IntPtr PyString_FromString(string value)
}

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyBytes_FromString(string op);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern int PyBytes_Size(IntPtr op);

internal static IntPtr PyBytes_AS_STRING(IntPtr ob)
{
return ob + BytesOffset.ob_sval;
}

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl,
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "PyUnicode_FromStringAndSize")]
internal static extern IntPtr PyString_FromStringAndSize(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string value,
int size
);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyUnicode_FromStringAndSize(IntPtr value, int size);
#elif PYTHON2
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
Expand All @@ -1212,13 +1212,13 @@ internal static bool PyUnicode_Check(IntPtr ob)
}

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyUnicode_FromObject(IntPtr ob);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyUnicode_FromEncodedObject(IntPtr ob, IntPtr enc, IntPtr err);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyUnicode_FromKindAndData(
int kind,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UcsMarshaler))] string s,
Expand All @@ -1230,13 +1230,13 @@ internal static IntPtr PyUnicode_FromUnicode(string s, int size)
return PyUnicode_FromKindAndData(UCS, s, size);
}

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern int PyUnicode_GetSize(IntPtr ob);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyUnicode_AsUnicode(IntPtr ob);

[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyUnicode_FromOrdinal(int c);
#elif PYTHON2
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
Expand Down Expand Up @@ -1474,7 +1474,7 @@ internal static bool PyIter_Check(IntPtr pointer)
internal static extern string PyModule_GetFilename(IntPtr module);

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyModule_Create2(IntPtr module, int apiver);
#endif

Expand All @@ -1494,7 +1494,7 @@ internal static bool PyIter_Check(IntPtr pointer)
internal static extern IntPtr PyImport_GetModuleDict();

#if PYTHON3
[DllImport(PythonDll, CallingConvention = CallingConvention.Cdecl)]
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern void PySys_SetArgvEx(
int argc,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StrArrayMarshaler))] string[] argv,
Expand Down