Skip to content
Extraits de code Groupes Projets
Valider ba49e72a rédigé par Patrick Watrin's avatar Patrick Watrin
Parcourir les fichiers

Python 2 support (work in progress)

parent d4343e0b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -515,6 +515,7 @@ static PyMethodDef unitex_methods[] = { ...@@ -515,6 +515,7 @@ static PyMethodDef unitex_methods[] = {
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef unitex_module_def = { static struct PyModuleDef unitex_module_def = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"_unitex", "_unitex",
...@@ -530,3 +531,8 @@ PyMODINIT_FUNC PyInit__unitex(void) { ...@@ -530,3 +531,8 @@ PyMODINIT_FUNC PyInit__unitex(void) {
return NULL; return NULL;
return module; return module;
} }
#else
void init_unitex(void) {
PyObject *module = Py_InitModule("_unitex", unitex_methods);
}
#endif
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter