diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-05-05 22:31:58 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-05-05 22:31:58 (GMT) |
commit | b173f7853e4e3a4215a661d98174291e379cf6fb (patch) | |
tree | 02735987f20fc27277a82c14c5da5e043cc134aa /Modules/pyexpat.c | |
parent | c679fd8efcae2b5d1117fc09380d74f0000086b0 (diff) | |
download | cpython-b173f7853e4e3a4215a661d98174291e379cf6fb.zip cpython-b173f7853e4e3a4215a661d98174291e379cf6fb.tar.gz cpython-b173f7853e4e3a4215a661d98174291e379cf6fb.tar.bz2 |
add a replacement API for PyCObject, PyCapsule #5630
All stdlib modules with C-APIs now use this.
Patch by Larry Hastings
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index a968e52..7a862c0 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1987,8 +1987,8 @@ MODULE_INITFUNC(void) capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler; capi.SetUserData = XML_SetUserData; - /* export as cobject */ - capi_object = PyCObject_FromVoidPtr(&capi, NULL); + /* export using capsule */ + capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL); if (capi_object) PyModule_AddObject(m, "expat_CAPI", capi_object); return m; |