mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-01 11:15:57 +00:00
fix pypy when no app is loaded
This commit is contained in:
@@ -246,6 +246,10 @@ void uwsgi_python_reset_random_seed() {
|
||||
random_seed = PyDict_GetItemString(random_dict, "seed");
|
||||
if (random_seed) {
|
||||
PyObject *random_args = PyTuple_New(1);
|
||||
Py_INCREF(random_args);
|
||||
#ifdef UWSGI_PYPY
|
||||
Py_INCREF(Py_None);
|
||||
#endif
|
||||
// pass no args
|
||||
PyTuple_SetItem(random_args, 0, Py_None);
|
||||
PyEval_CallObject(random_seed, random_args);
|
||||
|
||||
Reference in New Issue
Block a user