diff --git a/xbob/io/base/codec.cpp b/xbob/io/base/codec.cpp index 67a5c27ed22ba932d651af07af02979a383a5eb5..2e503514291be687d86a5e9cf9fad22f52db30e9 100644 --- a/xbob/io/base/codec.cpp +++ b/xbob/io/base/codec.cpp @@ -5,7 +5,7 @@ * @brief Bindings to bob::io::CodecRegistry */ -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include <xbob.io.base/api.h> int PyBobIoCodec_Register (const char* extension, const char* description, bob::io::file_factory_t factory) { diff --git a/xbob/io/base/file.cpp b/xbob/io/base/file.cpp index c3a3ebd39b6189677582e70c11fc4151bdd520d4..8974bc176090bb529fc28700900438eb7232b1fa 100644 --- a/xbob/io/base/file.cpp +++ b/xbob/io/base/file.cpp @@ -5,7 +5,7 @@ * @brief Bindings to bob::io::File */ -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include "bobskin.h" #include <xbob.io.base/api.h> #include <bob/io/CodecRegistry.h> diff --git a/xbob/io/base/hdf5.cpp b/xbob/io/base/hdf5.cpp index 8a4cd93f3caad42305825570454f17463a1501c5..4b84da7ebe9e2dc0d5750ab2252da8bd58fcacc0 100644 --- a/xbob/io/base/hdf5.cpp +++ b/xbob/io/base/hdf5.cpp @@ -5,7 +5,7 @@ * @brief Bindings to bob::io::HDF5File */ -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include <xbob.io.base/api.h> #include <boost/make_shared.hpp> diff --git a/xbob/io/base/include/xbob.io.base/api.h b/xbob/io/base/include/xbob.io.base/api.h index cab9c10cc53bc0bec5630c396d2a3d007496823d..081d13df95cb75cd68cfeb18f6f0882549716f91 100644 --- a/xbob/io/base/include/xbob.io.base/api.h +++ b/xbob/io/base/include/xbob.io.base/api.h @@ -5,13 +5,13 @@ * @brief C/C++ API for bob::io */ -#ifndef XBOB_IO_H -#define XBOB_IO_H +#ifndef XBOB_IO_BASE_H +#define XBOB_IO_BASE_H /* Define Module Name and Prefix for other Modules Note: We cannot use XBOB_EXT_* macros here, unfortunately */ -#define XBOB_IO_PREFIX "xbob.io.base" -#define XBOB_IO_FULL_NAME "xbob.io.base._library" +#define XBOB_IO_BASE_PREFIX "xbob.io.base" +#define XBOB_IO_BASE_FULL_NAME "xbob.io.base._library" #include <Python.h> @@ -181,7 +181,7 @@ typedef struct { #endif /* WITH_FFMPEG */ -#ifdef XBOB_IO_MODULE +#ifdef XBOB_IO_BASE_MODULE /* This section is used when compiling `xbob.io.base' itself */ @@ -323,7 +323,7 @@ typedef struct { PyObject *c_api_object; PyObject *module; - module = PyImport_ImportModule(XBOB_IO_FULL_NAME); + module = PyImport_ImportModule(XBOB_IO_BASE_FULL_NAME); if (module == NULL) return -1; @@ -355,15 +355,15 @@ typedef struct { # else "cobject" # endif - " at `" XBOB_IO_FULL_NAME "._C_API'"); + " at `" XBOB_IO_BASE_FULL_NAME "._C_API'"); return -1; } /* Checks that the imported version matches the compiled version */ int imported_version = *(int*)PyXbobIo_API[PyXbobIo_APIVersion_NUM]; - if (XBOB_IO_API_VERSION != imported_version) { - PyErr_Format(PyExc_ImportError, XBOB_IO_FULL_NAME " import error: you compiled against API version 0x%04x, but are now importing an API with version 0x%04x which is not compatible - check your Python runtime environment for errors", XBOB_IO_API_VERSION, imported_version); + if (XBOB_IO_BASE_API_VERSION != imported_version) { + PyErr_Format(PyExc_ImportError, XBOB_IO_BASE_FULL_NAME " import error: you compiled against API version 0x%04x, but are now importing an API with version 0x%04x which is not compatible - check your Python runtime environment for errors", XBOB_IO_BASE_API_VERSION, imported_version); return -1; } @@ -374,6 +374,6 @@ typedef struct { # endif //!defined(NO_IMPORT_ARRAY) -#endif /* XBOB_IO_MODULE */ +#endif /* XBOB_IO_BASE_MODULE */ -#endif /* XBOB_IO_H */ +#endif /* XBOB_IO_BASE_H */ diff --git a/xbob/io/base/include/xbob.io.base/config.h b/xbob/io/base/include/xbob.io.base/config.h index 98bb1b7f800074f473f459a9df77e30799e5e565..0305b45ecf89c8c496d9154b374a814b4c89957f 100644 --- a/xbob/io/base/include/xbob.io.base/config.h +++ b/xbob/io/base/include/xbob.io.base/config.h @@ -1,14 +1,14 @@ /** * @author Andre Anjos <andre.anjos@idiap.ch> - * @date Fri 1 Nov 07:10:59 2013 + * @date Fri 1 Nov 07:10:59 2013 * * @brief General directives for all modules in xbob.io */ -#ifndef XBOB_IO_CONFIG_H -#define XBOB_IO_CONFIG_H +#ifndef XBOB_IO_BASE_CONFIG_H +#define XBOB_IO_BASE_CONFIG_H /* Macros that define versions and important names */ -#define XBOB_IO_API_VERSION 0x0200 +#define XBOB_IO_BASE_API_VERSION 0x0200 -#endif /* XBOB_IO_CONFIG_H */ +#endif /* XBOB_IO_BASE_CONFIG_H */ diff --git a/xbob/io/base/main.cpp b/xbob/io/base/main.cpp index b890c7f44284f5a73cedcc4a7d35c4657532b042..0d2c460e70528324a21a1d6c240afbd50b6f1b1b 100644 --- a/xbob/io/base/main.cpp +++ b/xbob/io/base/main.cpp @@ -5,7 +5,7 @@ * @brief Bindings to bob::io */ -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include <xbob.io.base/api.h> #ifdef NO_IMPORT_ARRAY @@ -20,7 +20,7 @@ static PyMethodDef module_methods[] = { PyDoc_STRVAR(module_docstr, "bob::io classes and methods"); -int PyXbobIo_APIVersion = XBOB_IO_API_VERSION; +int PyXbobIo_APIVersion = XBOB_IO_BASE_API_VERSION; #if PY_VERSION_HEX >= 0x03000000 static PyModuleDef module_definition = { @@ -64,7 +64,7 @@ static PyObject* create_module (void) { auto m_ = make_safe(m); /* register some constants */ - if (PyModule_AddIntConstant(m, "__api_version__", XBOB_IO_API_VERSION) < 0) return 0; + if (PyModule_AddIntConstant(m, "__api_version__", XBOB_IO_BASE_API_VERSION) < 0) return 0; if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0) return 0; /* register the types to python */ diff --git a/xbob/io/base/version.cpp b/xbob/io/base/version.cpp index 0b7eae28c0ba2049f19340a6f071a767c5b4f4d3..977d8a68f997add0373d66d5da387bcb824bb7c4 100644 --- a/xbob/io/base/version.cpp +++ b/xbob/io/base/version.cpp @@ -10,7 +10,7 @@ #ifdef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY #endif -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include <xbob.io.base/config.h> #include <string> @@ -932,7 +932,7 @@ static PyObject* create_module (void) { auto m_ = make_safe(m); ///< protects against early returns /* register version numbers and constants */ - if (PyModule_AddIntConstant(m, "api", XBOB_IO_API_VERSION) < 0) + if (PyModule_AddIntConstant(m, "api", XBOB_IO_BASE_API_VERSION) < 0) return 0; if (PyModule_AddStringConstant(m, "module", XBOB_EXT_MODULE_VERSION) < 0) return 0; diff --git a/xbob/io/base/videoreader.cpp b/xbob/io/base/videoreader.cpp index 7aa0c08d96b2d6a6827a9d21e61d6181f84670be..837d0f62c51102a2f75889d57e14ff4c98be14b3 100644 --- a/xbob/io/base/videoreader.cpp +++ b/xbob/io/base/videoreader.cpp @@ -5,7 +5,7 @@ * @brief Bindings to bob::io::VideoReader */ -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include "bobskin.h" #include <xbob.io.base/api.h> diff --git a/xbob/io/base/videowriter.cpp b/xbob/io/base/videowriter.cpp index 1f26aab8db898822d317cacff76328b35749edfc..2261774c6fb39627f6659c13085c92f1689dedd7 100644 --- a/xbob/io/base/videowriter.cpp +++ b/xbob/io/base/videowriter.cpp @@ -5,7 +5,7 @@ * @brief Bindings to bob::io::VideoWriter */ -#define XBOB_IO_MODULE +#define XBOB_IO_BASE_MODULE #include "bobskin.h" #include <xbob.io.base/api.h>