mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
add a replacement API for PyCObject, PyCapsule #5630
All stdlib modules with C-APIs now use this. Patch by Larry Hastings
This commit is contained in:
parent
c679fd8efc
commit
b173f7853e
37 changed files with 943 additions and 149 deletions
|
@ -1275,7 +1275,7 @@ PyInit_unicodedata(void)
|
|||
PyModule_AddObject(m, "ucd_3_2_0", v);
|
||||
|
||||
/* Export C API */
|
||||
v = PyCObject_FromVoidPtr((void *) &hashAPI, NULL);
|
||||
v = PyCapsule_New((void *)&hashAPI, PyUnicodeData_CAPSULE_NAME, NULL);
|
||||
if (v != NULL)
|
||||
PyModule_AddObject(m, "ucnhash_CAPI", v);
|
||||
return m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue