Changeset 391 for python/trunk/Include/py_curses.h
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Include/py_curses.h
r2 r391 81 81 #define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type) 82 82 83 #define PyCurses_CAPSULE_NAME "_curses._C_API" 84 85 83 86 #ifdef CURSES_MODULE 84 87 /* This section is used when compiling _cursesmodule.c */ … … 95 98 96 99 #define import_curses() \ 97 { \ 98 PyObject *module = PyImport_ImportModuleNoBlock("_curses"); \ 99 if (module != NULL) { \ 100 PyObject *module_dict = PyModule_GetDict(module); \ 101 PyObject *c_api_object = PyDict_GetItemString(module_dict, "_C_API"); \ 102 if (PyCObject_Check(c_api_object)) { \ 103 PyCurses_API = (void **)PyCObject_AsVoidPtr(c_api_object); \ 104 } \ 105 } \ 106 } 100 PyCurses_API = (void **)PyCapsule_Import(PyCurses_CAPSULE_NAME, 1); 101 107 102 #endif 108 103
Note:
See TracChangeset
for help on using the changeset viewer.