You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2002/11/15 16:25:08 UTC
cvs commit: httpd-python/src mod_python.c
grisha 2002/11/15 07:25:08
Modified: src mod_python.c
Log:
Wait to call Py_Initialize until the 2nd DSO load.
Submitted by: Justin Erenkrantz
Revision Changes Path
1.85 +13 -1 httpd-python/src/mod_python.c
Index: mod_python.c
===================================================================
RCS file: /home/cvs/httpd-python/src/mod_python.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- mod_python.c 8 Nov 2002 00:15:11 -0000 1.84
+++ mod_python.c 15 Nov 2002 15:25:07 -0000 1.85
@@ -166,6 +166,9 @@
PyEval_AcquireLock();
#endif
+ if (!interpreters)
+ return NULL;
+
p = PyDict_GetItemString(interpreters, (char *)name);
if (!p)
{
@@ -328,6 +331,15 @@
{
char buff[255];
+ void *data;
+ const char *userdata_key = "python_init";
+
+ apr_pool_userdata_get(&data, userdata_key, s->process->pool);
+ if (!data) {
+ apr_pool_userdata_set((const void *)1, userdata_key,
+ apr_pool_cleanup_null, s->process->pool);
+ return OK;
+ }
/* mod_python version */
ap_add_version_component(p, VERSION_COMPONENT);