Add missing #ifdef checks (#1096)

This commit is contained in:
Paul I 2019-01-12 18:43:51 +03:00 committed by xarkes
parent 3666c97178
commit c378c7d6f3
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,5 @@
#ifdef CUTTER_ENABLE_JUPYTER
#include <Python.h> #include <Python.h>
#include <marshal.h> #include <marshal.h>
@ -97,3 +99,5 @@ PyObject *PyInit_qtres()
{ {
return PyModule_Create(&QtResModule); return PyModule_Create(&QtResModule);
} }
#endif // CUTTER_ENABLE_JUPYTER

View File

@ -1,10 +1,14 @@
#ifndef QTRESIMPORTER_H #ifndef QTRESIMPORTER_H
#define QTRESIMPORTER_H #define QTRESIMPORTER_H
#ifdef CUTTER_ENABLE_JUPYTER
PyObject *PyInit_qtres(); PyObject *PyInit_qtres();
PyObject *QtResImport(const char *name); PyObject *QtResImport(const char *name);
#define RegQtResImporter() Py_DecRef(QtResImport("reg_qtres_importer")) #define RegQtResImporter() Py_DecRef(QtResImport("reg_qtres_importer"))
#endif // CUTTER_ENABLE_JUPYTER
#endif // QTRESIMPORTER_H #endif // QTRESIMPORTER_H