Remove non-existent PInvoke functions#1205
Conversation
src/runtime/runtime.cs
Outdated
|
|
||
| [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | ||
| [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "_PyObject_GC_New")] | ||
| internal static extern IntPtr PyObject_GC_New(IntPtr tp); |
There was a problem hiding this comment.
None.
Its implemetantion is
#define PyObject_GC_New(type, typeobj) \
( (type *) _PyObject_GC_New(typeobj) )Just compare to the PyObject_CheckBuffer, it's easy to make it be a PInvoke function by specific the entry point.
There was a problem hiding this comment.
If it's not used, just remove it.
There was a problem hiding this comment.
Well, it's a not big deal though, but what's bad for declaring a valid api?
There was a problem hiding this comment.
If we don't use it, it should not be included. The fewer functions we refer to, the easier it will be to keep compatible with different Python versions from the same DLL.
There was a problem hiding this comment.
That's a point, although I don't think this API will be deleted in the future.
Removed it.
Codecov Report
@@ Coverage Diff @@
## master #1205 +/- ##
=======================================
Coverage 86.25% 86.25%
=======================================
Files 1 1
Lines 291 291
=======================================
Hits 251 251
Misses 40 40
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
What does this implement/fix? Explain your changes.
Deprecated Python2 API:
Mere macros on C side:
_PyObject_GC_New)Check method:
https://gist.github.com/amos402/fb41571856bc77a2bada8056e429b312
Does this close any currently open issues?
...
Any other comments?
...
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG