disabled embedded loading in python 3.x

This commit is contained in:
roberto@debian32
2011-07-18 19:18:00 +02:00
parent 9761153ab0
commit 4c19a941eb
7 changed files with 12 additions and 5 deletions

View File

@@ -807,7 +807,9 @@ void uwsgi_python_init_apps() {
#endif
#ifdef __linux__
#ifndef PYTHREE
uwsgi_init_symbol_import();
#endif
#endif
if (up.test_module != NULL) {

View File

@@ -197,19 +197,22 @@ int uwsgi_init_symbol_import() {
if (PyType_Ready(&SymImporter_Type) < 0) {
PyErr_Print();
uwsgi_log("unable to initialize symbols importer module\n");
exit(1);
}
PyObject *uwsgi_em = PyImport_ImportModule("uwsgi");
if (!uwsgi_em) {
PyErr_Print();
uwsgi_log("unable to get uwsgi module\n");
exit(1);
}
if (PyModule_AddObject(uwsgi_em, "SymbolsImporter",
(PyObject *)&SymImporter_Type) < 0) {
uwsgi_log("unable to initialize symbols importer module\n");
PyErr_Print();
uwsgi_log("unable to initialize symbols importer object\n");
exit(1);
}

View File

@@ -233,5 +233,7 @@ int uwsgi_python_profiler_call(PyObject *, PyFrameObject *, int, PyObject *);
void uwsgi_python_reset_random_seed(void);
#ifdef __linux__
#ifndef PYTHREE
int uwsgi_init_symbol_import(void);
#endif
#endif