Implement SmallVector_Type, pycapsule_new

This commit is contained in:
Siu Kwan Lam 2013-01-23 14:50:17 -06:00
commit 6a861d82e6
8 changed files with 82 additions and 39 deletions

View file

@ -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;
}
}