PyMODINIT_FUNC initpyhlextract(void) { PyObject* m; if (PyType_Ready(&PackageType) < 0) return; m = Py_InitModule3("pyhlextract", hlextractMethods, ""); if (m == NULL) return; if (all_ins(m)) return; Py_INCREF(&PackageType); PyModule_AddObject(m, "Package", (PyObject *)&PackageType); // Initialize hllib hlInitialize(); // Callbacks hlSetVoid(HL_PROC_EXTRACT_ITEM_START, ExtractItemStartCallback); hlSetVoid(HL_PROC_EXTRACT_ITEM_END, ExtractItemEndCallback); hlSetVoid(HL_PROC_EXTRACT_FILE_PROGRESS, FileProgressCallback); hlSetVoid(HL_PROC_VALIDATE_FILE_PROGRESS, FileProgressCallback); hlSetVoid(HL_PROC_DEFRAGMENT_PROGRESS_EX, DefragmentProgressCallback); }
initfcntl(void) { PyObject *m, *d; /* Create the module and add the functions and documentation */ m = Py_InitModule3("fcntl", fcntl_methods, module_doc); /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); all_ins(d); }
void initcore() { PyObject *m; m = Py_InitModule3 ("async.core", core_methods, "wrappers for SFS core event loop"); if (m == NULL) return; if (all_ins (m) < 0) return; (void) Py_InitModule ("core", core_methods); }