mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-04 04:31:44 +00:00
PyPy SUPPORT
This commit is contained in:
@@ -6,9 +6,16 @@ struct uwsgi_python up;
|
||||
extern struct http_status_codes hsc[];
|
||||
|
||||
#ifdef UWSGI_PYPY
|
||||
char *RPython_StartupCode(void);
|
||||
|
||||
#define pypy_asm_stack_bottom() asm volatile ("/* GC_STACK_BOTTOM */" : : : \
|
||||
"memory")
|
||||
|
||||
char *RPython_StartupCode(void);
|
||||
|
||||
extern struct pypy_pypy_module_cpyext_state_State0 pypy_g_pypy_module_cpyext_state_State;
|
||||
extern struct pypy_pypy_interpreter_baseobjspace_W_Root0 *pypy_g_call_startup(void);
|
||||
void pypy_g_State_startup(struct pypy_pypy_module_cpyext_state_State0 *);
|
||||
|
||||
void Py_Initialize(void) {
|
||||
|
||||
pypy_asm_stack_bottom();
|
||||
@@ -17,6 +24,9 @@ void Py_Initialize(void) {
|
||||
uwsgi_log("unable to initialize PyPy: %s\n", errmsg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pypy_g_call_startup();
|
||||
pypy_g_State_startup(&pypy_g_pypy_module_cpyext_state_State);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -712,11 +722,7 @@ void init_uwsgi_embedded_module() {
|
||||
#ifdef UNBIT
|
||||
if (PyDict_SetItemString(up.embedded_dict, "unbit", Py_True)) {
|
||||
#else
|
||||
uwsgi_log("UNO\n");
|
||||
Py_INCREF(Py_None);
|
||||
uwsgi_log("UNO.0\n");
|
||||
if (PyDict_SetItemString(up.embedded_dict, "unbit", &_Py_NoneStruct)) {
|
||||
uwsgi_log("DUE\n");
|
||||
if (PyDict_SetItemString(up.embedded_dict, "unbit", Py_None)) {
|
||||
#endif
|
||||
PyErr_Print();
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user