Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
/pythonnetPublic archive
forked frompythonnet/pythonnet

Commit1ce630e

Browse files
Cronanfilmor
authored andcommitted
Removes imports deprecated in Python3 (pythonnet#925)
1 parent6f635a4 commit1ce630e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

‎CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
1515

1616
- Added argument types information to "No method matches given arguments" message
1717
- Moved wheel import in setup.py inside of a try/except to prevent pip collection failures
18+
- Removes PyLong_GetMax and PyClass_New when targetting Python3
1819

1920
###Fixed
2021

‎src/runtime/runtime.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,10 @@ public static extern int Py_Main(
769769
[DllImport(_PythonDll,CallingConvention=CallingConvention.Cdecl)]
770770
internalstaticexternIntPtr PyCFunction_Call(IntPtrfunc,IntPtrargs,IntPtrkw);
771771

772+
#ifPYTHON2
772773
[DllImport(_PythonDll,CallingConvention=CallingConvention.Cdecl)]
773774
internalstaticexternIntPtr PyClass_New(IntPtrbases,IntPtrdict,IntPtrname);
775+
#endif
774776

775777
[DllImport(_PythonDll,CallingConvention=CallingConvention.Cdecl)]
776778
internalstaticexternIntPtr PyInstance_New(IntPtrcls,IntPtrargs,IntPtrkw);
@@ -1012,10 +1014,6 @@ internal static IntPtr PyInt_FromInt64(long value)
10121014
[DllImport(_PythonDll, CallingConvention= CallingConvention.Cdecl,
10131015
EntryPoint= "PyLong_FromString")]
10141016
internalstaticextern IntPtr PyInt_FromString(string value, IntPtr end,int radix);
1015-
1016-
[DllImport(_PythonDll, CallingConvention= CallingConvention.Cdecl,
1017-
EntryPoint= "PyLong_GetMax")]
1018-
internalstaticexternint PyInt_GetMax();
10191017
#elif PYTHON2
10201018
[DllImport(_PythonDll, CallingConvention= CallingConvention.Cdecl)]
10211019
privatestaticextern IntPtr PyInt_FromLong(IntPtr value);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp