Implement SmallVector_Type, pycapsule_new
This commit is contained in:
parent
ef4c0d3be3
commit
6a861d82e6
8 changed files with 82 additions and 39 deletions
|
|
@ -51,10 +51,12 @@ create_python_submodule(PyObject* parent, const char* name,
|
|||
strcpy(fullname + len_parent + 1, name);
|
||||
PyObject* submod = create_python_module(fullname, methtable);
|
||||
delete [] fullname;
|
||||
if (!submod)
|
||||
if (!submod){
|
||||
return NULL;
|
||||
if( -1 == PyModule_AddObject(parent, name, submod) )
|
||||
}
|
||||
if (-1 == PyModule_AddObject(parent, name, submod)) {
|
||||
return NULL;
|
||||
}
|
||||
return submod;
|
||||
}
|
||||
|
||||
|
|
@ -70,4 +72,5 @@ int populate_submodules(PyObject* parent, SubModuleEntry* entries){
|
|||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue