diff options
author | Larry Hastings <larry@hastings.org> | 2010-03-25 00:54:54 +0000 |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2010-03-25 00:54:54 +0000 |
commit | 402b73fb8d54ec2b24b52fdd77d389d903fa6c44 (patch) | |
tree | ced928b7f7dce754142742e485ed8e836fbc9486 /Modules/cStringIO.c | |
parent | 53ff86ea5f0ed27f5eb5b966faf59dac298d6672 (diff) | |
download | cpython-git-402b73fb8d54ec2b24b52fdd77d389d903fa6c44.tar.gz |
Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r-- | Modules/cStringIO.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index 237d8c2f1f..80588bfa33 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -761,8 +761,8 @@ initcStringIO(void) { Py_TYPE(&Otype)=&PyType_Type; if (PyType_Ready(&Otype) < 0) return; if (PyType_Ready(&Itype) < 0) return; - PyDict_SetItemString(d,"cStringIO_CAPI", - v = PyCObject_FromVoidPtr(&CAPI,NULL)); + v = PyCapsule_New(&CAPI, PycStringIO_CAPSULE_NAME, NULL); + PyDict_SetItemString(d,"cStringIO_CAPI", v); Py_XDECREF(v); /* Export Types */ |