Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision a9d157a8dd7a5b2b53b60680729c320f9fd9f96c authored by Victor Stinner on 04 March 2010, 12:16:27 UTC, committed by Victor Stinner on 04 March 2010, 12:16:27 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78647 | victor.stinner | 2010-03-04 13:14:57 +0100 (jeu., 04 mars 2010) | 12 lines Merged revisions 78646 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78646 | victor.stinner | 2010-03-04 13:09:33 +0100 (jeu., 04 mars 2010) | 5 lines Issue #1054943: Fix unicodedata.normalize('NFC', text) for the Public Review Issue #29. PR #29 was released in february 2004! ........ ................
1 parent da13545
Tip revision: a9d157a8dd7a5b2b53b60680729c320f9fd9f96c authored by Victor Stinner on 04 March 2010, 12:16:27 UTC
Merged revisions 78647 via svnmerge from
Merged revisions 78647 via svnmerge from
Tip revision: a9d157a
cobject.h
/*
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 */
Computing file changes ...