mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Export type objects to Python
This commit is contained in:
parent
6dd4868681
commit
a755e68df6
19 changed files with 111 additions and 7 deletions
|
|
@ -478,7 +478,7 @@ ctbcm_setattr(self, name, v)
|
|||
statichere PyTypeObject ctbcmtype = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
0, /*ob_size*/
|
||||
"ctbcm", /*tp_name*/
|
||||
"CTBConnectionMgr", /*tp_name*/
|
||||
sizeof(ctbcmobject), /*tp_basicsize*/
|
||||
0, /*tp_itemsize*/
|
||||
/* methods */
|
||||
|
|
@ -608,6 +608,9 @@ initctb()
|
|||
|
||||
ErrorObject = PyString_FromString("ctb.error");
|
||||
PyDict_SetItemString(d, "error", ErrorObject);
|
||||
ctbcmtype.ob_type = &PyType_Type;
|
||||
Py_INCREF(&ctbcmtype);
|
||||
PyDict_SetItemString(d, "CTBConnectionMgrType", (PyObject *)&ctbcmtype);
|
||||
|
||||
/* Check for errors */
|
||||
if (PyErr_Occurred())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue