diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-07-01 01:28:55 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-07-01 01:28:55 (GMT) |
commit | f1664ae13a4c2505ed1fee2d1090ee701c07aa63 (patch) | |
tree | fcf1796ac15c61bfb86b5f6071d4a8ede0bfa1b5 /Include | |
parent | 286a0d2ff7b04474dca7e30b3612ae699db5234a (diff) | |
download | cpython-f1664ae13a4c2505ed1fee2d1090ee701c07aa63.zip cpython-f1664ae13a4c2505ed1fee2d1090ee701c07aa63.tar.gz cpython-f1664ae13a4c2505ed1fee2d1090ee701c07aa63.tar.bz2 |
remove PyCObject
Diffstat (limited to 'Include')
-rw-r--r-- | Include/Python.h | 1 | ||||
-rw-r--r-- | Include/cobject.h | 61 |
2 files changed, 0 insertions, 62 deletions
diff --git a/Include/Python.h b/Include/Python.h index 5c6e1f2..aa805e7 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -88,7 +88,6 @@ #include "funcobject.h" #include "classobject.h" #include "fileobject.h" -#include "cobject.h" #include "pycapsule.h" #include "traceback.h" #include "sliceobject.h" diff --git a/Include/cobject.h b/Include/cobject.h deleted file mode 100644 index 9efe4ce..0000000 --- a/Include/cobject.h +++ /dev/null @@ -1,61 +0,0 @@ - -/* - -The CObject module is now *deprecated* as of Python 3.1. -Please use the Capsule API instead; see "pycapsule.h". - -*/ - -#ifndef Py_COBJECT_H -#define Py_COBJECT_H -#ifdef __cplusplus -extern "C" { -#endif - -PyAPI_DATA(PyTypeObject) PyCObject_Type; - -#define PyCObject_Check(op) (Py_TYPE(op) == &PyCObject_Type) - -/* Create a PyCObject from a pointer to a C object and an optional - destructor function. If the second argument is non-null, then it - will be called with the first argument if and when the PyCObject is - destroyed. - -*/ -PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtr( - void *cobj, void (*destruct)(void*)); - - -/* Create a PyCObject from a pointer to a C object, a description object, - and an optional destructor function. If the third argument is non-null, - then it will be called with the first and second arguments if and when - the PyCObject is destroyed. -*/ -PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtrAndDesc( - void *cobj, void *desc, void (*destruct)(void*,void*)); - -/* Retrieve a pointer to a C object from a PyCObject. */ -PyAPI_FUNC(void *) PyCObject_AsVoidPtr(PyObject *); - -/* Retrieve a pointer to a description object from a PyCObject. */ -PyAPI_FUNC(void *) PyCObject_GetDesc(PyObject *); - -/* Import a pointer to a C object from a module using a PyCObject. */ -PyAPI_FUNC(void *) PyCObject_Import(char *module_name, char *cobject_name); - -/* Modify a C object. Fails (==0) if object has a destructor. */ -PyAPI_FUNC(int) PyCObject_SetVoidPtr(PyObject *self, void *cobj); - - -typedef struct { - PyObject_HEAD - void *cobject; - void *desc; - void (*destructor)(void *); -} PyCObject; - - -#ifdef __cplusplus -} -#endif -#endif /* !Py_COBJECT_H */ |