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 2003/07/22 22:13:12 UTC
cvs commit: httpd-python/src/include mod_python.h
grisha 2003/07/22 13:13:12
Modified: src mod_python.c
src/include mod_python.h
Log:
rollback some accidently checked in stuff
Revision Changes Path
1.92 +3 -46 httpd-python/src/mod_python.c
Index: mod_python.c
===================================================================
RCS file: /home/cvs/httpd-python/src/mod_python.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- mod_python.c 17 Jul 2003 00:51:46 -0000 1.91
+++ mod_python.c 22 Jul 2003 20:13:12 -0000 1.92
@@ -321,40 +321,6 @@
}
/**
- ** python_create_global_config
- **
- * This creates the part of config that survives
- * server restarts
- *
- */
-
-static py_global *python_create_global_config(server_rec *s)
-{
- apr_pool_t *pool = s->process->pool;
- py_global *glb;
-
- /* do we already have it in s->process->pool? */
-
- apr_pool_userdata_get((void **)&glb, MP_CONFIG_KEY, pool);
-
- if (glb) {
- return glb;
- }
-
-
- /* otherwise, create it */
-
- glb = (py_global *)apr_palloc(pool, sizeof(*glb));
- glb->shm_file = "/tmp/mod_python.shm"; //XXX
- glb->shm_size = 64000; //XXX
- glb->shm = NULL;
- glb->rmm = NULL;
- glb->table = NULL;
-
- return glb;
-}
-
-/**
** python_init()
**
* Called by Apache at mod_python initialization time.
@@ -409,16 +375,11 @@
/* release the lock; now other threads can run */
PyEval_ReleaseLock();
#endif
-
+/* XXX PSP_PG(files) = PyDict_New(); */
}
-
- python_create_global_config(s);
- /* table_rmm_init(s, p); */
-
return OK;
}
-
/**
** python_create_config
**
@@ -436,11 +397,11 @@
conf->hlists = apr_hash_make(p);
conf->in_filters = apr_hash_make(p);
conf->out_filters = apr_hash_make(p);
- conf->global = NULL;
return conf;
}
+
/**
** python_create_dir_config
**
@@ -476,8 +437,6 @@
py_config *conf = python_create_config(p);
- conf->global = python_create_global_config(srv);
-
return conf;
}
@@ -561,8 +520,6 @@
apr_hash_this(hi, (const void**)&key, &klen, (void **)&hle);
apr_hash_set(merged_conf->out_filters, key, klen, (void *)hle);
}
-
- merged_conf->global = nc->global ? nc->global : cc->global;
return (void *) merged_conf;
}
1.32 +2 -21 httpd-python/src/include/mod_python.h
Index: mod_python.h
===================================================================
RCS file: /home/cvs/httpd-python/src/include/mod_python.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- mod_python.h 17 Jul 2003 00:51:46 -0000 1.31
+++ mod_python.h 22 Jul 2003 20:13:12 -0000 1.32
@@ -82,8 +82,6 @@
#include "apr_strings.h"
#include "apr_lib.h"
#include "apr_hash.h"
-#include "apr_rmm.h"
-#include "apr_shm.h"
#include "scoreboard.h"
/* Python headers */
@@ -121,10 +119,8 @@
#include "_apachemodule.h"
#include "_pspmodule.h"
-
/** Things specific to mod_python, as an Apache module **/
-#define MP_CONFIG_KEY "python_module"
#define VERSION_COMPONENT "mod_python/" MPV_STRING
#define MODULENAME "mod_python.apache"
#define INITFUNC "init"
@@ -146,27 +142,16 @@
PyObject *obcallback;
} interpreterdata;
-/* Shared memory info */
-typedef struct
-{
- char *shm_file;
- apr_size_t shm_size;
- apr_shm_t *shm;
- apr_rmm_t *rmm;
- apr_table_t *table;
-} py_global;
-
/* structure describing per directory configuration parameters */
typedef struct {
int authoritative;
char *config_dir;
apr_table_t *directives;
apr_table_t *options;
- apr_hash_t *hlists; /* hlists for every phase */
+ apr_hash_t *hlists; /* hlists for every phase */
apr_hash_t *in_filters;
apr_hash_t *out_filters;
hl_entry *imports; /* for PythonImport */
- py_global *global;
} py_config;
/* register_cleanup info */
@@ -202,9 +187,5 @@
} py_handler;
apr_status_t python_cleanup(void *data);
-
-void table_rmm_init(server_rec *s, apr_pool_t *p);
-int table_rmm_store(server_rec *s, char *key, char *val);
-char *table_rmm_retrieve(server_rec *s, char *key);
#endif /* !Mp_MOD_PYTHON_H */