mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-05-14 18:53:43 +00:00
disabled embedded loading in python 3.x
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user