Skip to content
Snippets Groups Projects
Commit 14248566 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Avoid recursive import

parent cd82ddea
No related branches found
No related tags found
No related merge requests found
......@@ -234,8 +234,6 @@ typedef struct {
# if !defined(NO_IMPORT_ARRAY)
#include <xbob.io/api.h>
/**
* Returns -1 on error, 0 on success. PyCapsule_Import will set an exception
* if there's an error.
......@@ -290,13 +288,6 @@ typedef struct {
return -1;
}
/* Imports the xbob.blitz C-API */
if (import_xbob_io() < 0) {
PyErr_Print();
PyErr_SetString(PyExc_ImportError, "xbob.io failed to import");
return -1;
}
/* If you get to this point, all is good */
return 0;
......
......@@ -153,6 +153,7 @@ static PyObject* create_module (void) {
if (c_api_object) PyModule_AddObject(m, "_C_API", c_api_object);
/* imports xbob.io C-API + dependencies */
if (import_xbob_blitz() < 0) return 0;
if (import_xbob_io() < 0) return 0;
Py_INCREF(m);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment