Backported PyCapsule from 3.1, and converted most uses of

CObject to PyCapsule.
This commit is contained in:
Larry Hastings 2010-03-25 00:54:54 +00:00
parent 53ff86ea5f
commit 402b73fb8d
40 changed files with 1048 additions and 127 deletions

View file

@ -460,6 +460,9 @@
<File
RelativePath="..\..\Objects\bytes_methods.c">
</File>
<File
RelativePath="..\..\Objects\capsule.c">
</File>
<File
RelativePath="..\..\Objects\cellobject.c">
</File>

View file

@ -854,6 +854,10 @@
RelativePath="..\..\Include\pyarena.h"
>
</File>
<File
RelativePath="..\..\Include\pycapsule.h"
>
</File>
<File
RelativePath="..\..\Include\pyctype.h"
>
@ -1418,6 +1422,10 @@
RelativePath="..\..\Objects\stringobject.c"
>
</File>
<File
RelativePath="..\..\Objects\capsule.c"
>
</File>
<File
RelativePath="..\..\Objects\cellobject.c"
>

View file

@ -210,6 +210,19 @@ EXPORTS
"PyInstance_Type"
"PyMethod_Type"
; From python27_s.lib(capsule)
"PyCapsule_GetContext"
"PyCapsule_GetDestructor"
"PyCapsule_GetName"
"PyCapsule_GetPointer"
"PyCapsule_Import"
"PyCapsule_IsValid"
"PyCapsule_New"
"PyCapsule_SetContext"
"PyCapsule_SetDestructor"
"PyCapsule_SetName"
"PyCapsule_SetPointer"
; From python27_s.lib(cobject)
"PyCObject_FromVoidPtr"
"PyCObject_FromVoidPtrAndDesc"

View file

@ -6,6 +6,7 @@ DATA MULTIPLE NONSHARED
EXPORTS
; Data
PyCFunction_Type
PyCapsule_Type
PyCObject_Type
PyClass_Type
PyCode_Type
@ -75,6 +76,7 @@ EXPORTS
_Py_TrueStruct
_Py_ZeroStruct
_Py_abstract_hack
_Py_capsule_hack
_Py_cobject_hack
_Py_re_syntax
_Py_re_syntax_table
@ -89,6 +91,17 @@ EXPORTS
PyCFunction_GetFunction
PyCFunction_GetSelf
PyCFunction_New
PyCapsule_GetContext
PyCapsule_GetDestructor
PyCapsule_GetName
PyCapsule_GetPointer
PyCapsule_Import
PyCapsule_IsValid
PyCapsule_New
PyCapsule_SetContext
PyCapsule_SetDestructor
PyCapsule_SetName
PyCapsule_SetPointer
PyCObject_AsVoidPtr
PyCObject_FromVoidPtrAndDesc
PyCObject_FromVoidPtr