Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python2....
File: cobject.h
/*
[0] Fix | Delete
CObjects are marked Pending Deprecation as of Python 2.7.
[1] Fix | Delete
The full schedule for 2.x is as follows:
[2] Fix | Delete
- CObjects are marked Pending Deprecation in Python 2.7.
[3] Fix | Delete
- CObjects will be marked Deprecated in Python 2.8
[4] Fix | Delete
(if there is one).
[5] Fix | Delete
- CObjects will be removed in Python 2.9 (if there is one).
[6] Fix | Delete
[7] Fix | Delete
Additionally, for the Python 3.x series:
[8] Fix | Delete
- CObjects were marked Deprecated in Python 3.1.
[9] Fix | Delete
- CObjects will be removed in Python 3.2.
[10] Fix | Delete
[11] Fix | Delete
You should switch all use of CObjects to capsules. Capsules
[12] Fix | Delete
have a safer and more consistent API. For more information,
[13] Fix | Delete
see Include/pycapsule.h, or read the "Capsules" topic in
[14] Fix | Delete
the "Python/C API Reference Manual".
[15] Fix | Delete
[16] Fix | Delete
Python 2.7 no longer uses CObjects itself; all objects which
[17] Fix | Delete
were formerly CObjects are now capsules. Note that this change
[18] Fix | Delete
does not by itself break binary compatibility with extensions
[19] Fix | Delete
built for previous versions of Python--PyCObject_AsVoidPtr()
[20] Fix | Delete
has been changed to also understand capsules.
[21] Fix | Delete
[22] Fix | Delete
*/
[23] Fix | Delete
[24] Fix | Delete
/* original file header comment follows: */
[25] Fix | Delete
[26] Fix | Delete
/* C objects to be exported from one extension module to another.
[27] Fix | Delete
[28] Fix | Delete
C objects are used for communication between extension modules.
[29] Fix | Delete
They provide a way for an extension module to export a C interface
[30] Fix | Delete
to other extension modules, so that extension modules can use the
[31] Fix | Delete
Python import mechanism to link to one another.
[32] Fix | Delete
[33] Fix | Delete
*/
[34] Fix | Delete
[35] Fix | Delete
#ifndef Py_COBJECT_H
[36] Fix | Delete
#define Py_COBJECT_H
[37] Fix | Delete
#ifdef __cplusplus
[38] Fix | Delete
extern "C" {
[39] Fix | Delete
#endif
[40] Fix | Delete
[41] Fix | Delete
PyAPI_DATA(PyTypeObject) PyCObject_Type;
[42] Fix | Delete
[43] Fix | Delete
#define PyCObject_Check(op) (Py_TYPE(op) == &PyCObject_Type)
[44] Fix | Delete
[45] Fix | Delete
/* Create a PyCObject from a pointer to a C object and an optional
[46] Fix | Delete
destructor function. If the second argument is non-null, then it
[47] Fix | Delete
will be called with the first argument if and when the PyCObject is
[48] Fix | Delete
destroyed.
[49] Fix | Delete
[50] Fix | Delete
*/
[51] Fix | Delete
PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtr(
[52] Fix | Delete
void *cobj, void (*destruct)(void*));
[53] Fix | Delete
[54] Fix | Delete
[55] Fix | Delete
/* Create a PyCObject from a pointer to a C object, a description object,
[56] Fix | Delete
and an optional destructor function. If the third argument is non-null,
[57] Fix | Delete
then it will be called with the first and second arguments if and when
[58] Fix | Delete
the PyCObject is destroyed.
[59] Fix | Delete
*/
[60] Fix | Delete
PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtrAndDesc(
[61] Fix | Delete
void *cobj, void *desc, void (*destruct)(void*,void*));
[62] Fix | Delete
[63] Fix | Delete
/* Retrieve a pointer to a C object from a PyCObject. */
[64] Fix | Delete
PyAPI_FUNC(void *) PyCObject_AsVoidPtr(PyObject *);
[65] Fix | Delete
[66] Fix | Delete
/* Retrieve a pointer to a description object from a PyCObject. */
[67] Fix | Delete
PyAPI_FUNC(void *) PyCObject_GetDesc(PyObject *);
[68] Fix | Delete
[69] Fix | Delete
/* Import a pointer to a C object from a module using a PyCObject. */
[70] Fix | Delete
PyAPI_FUNC(void *) PyCObject_Import(char *module_name, char *cobject_name);
[71] Fix | Delete
[72] Fix | Delete
/* Modify a C object. Fails (==0) if object has a destructor. */
[73] Fix | Delete
PyAPI_FUNC(int) PyCObject_SetVoidPtr(PyObject *self, void *cobj);
[74] Fix | Delete
[75] Fix | Delete
[76] Fix | Delete
typedef struct {
[77] Fix | Delete
PyObject_HEAD
[78] Fix | Delete
void *cobject;
[79] Fix | Delete
void *desc;
[80] Fix | Delete
void (*destructor)(void *);
[81] Fix | Delete
} PyCObject;
[82] Fix | Delete
[83] Fix | Delete
[84] Fix | Delete
#ifdef __cplusplus
[85] Fix | Delete
}
[86] Fix | Delete
#endif
[87] Fix | Delete
#endif /* !Py_COBJECT_H */
[88] Fix | Delete
[89] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function