diff options
author | Larry Hastings <larry@hastings.org> | 2010-03-25 00:54:54 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2010-03-25 00:54:54 (GMT) |
commit | 402b73fb8d54ec2b24b52fdd77d389d903fa6c44 (patch) | |
tree | ced928b7f7dce754142742e485ed8e836fbc9486 /Modules/_cursesmodule.c | |
parent | 53ff86ea5f0ed27f5eb5b966faf59dac298d6672 (diff) | |
download | cpython-402b73fb8d54ec2b24b52fdd77d389d903fa6c44.zip cpython-402b73fb8d54ec2b24b52fdd77d389d903fa6c44.tar.gz cpython-402b73fb8d54ec2b24b52fdd77d389d903fa6c44.tar.bz2 |
Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 430ab17..3f95cef 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -172,7 +172,7 @@ static int initialisedcolors = FALSE; /* * Check the return code from a curses function and return None * or raise an exception as appropriate. These are exported using the - * CObject API. + * capsule API. */ static PyObject * @@ -2745,8 +2745,8 @@ init_curses(void) return; ModDict = d; /* For PyCurses_InitScr to use later */ - /* Add a CObject for the C API */ - c_api_object = PyCObject_FromVoidPtr((void *)PyCurses_API, NULL); + /* Add a capsule for the C API */ + c_api_object = PyCapsule_New(PyCurses_API, PyCurses_CAPSULE_NAME, NULL); PyDict_SetItemString(d, "_C_API", c_api_object); Py_DECREF(c_api_object); |