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 2006/04/09 12:05:02 UTC

svn commit: r392699 - in /httpd/mod_python/trunk/src: mod_python.c requestobject.c

Author: grahamd
Date: Sun Apr  9 03:04:59 2006
New Revision: 392699

URL: http://svn.apache.org/viewcvs?rev=392699&view=rev
Log:
Fixed various constness and other pointer typing issues to eliminate warnings
generated by compiler.

Modified:
    httpd/mod_python/trunk/src/mod_python.c
    httpd/mod_python/trunk/src/requestobject.c

Modified: httpd/mod_python/trunk/src/mod_python.c
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/mod_python.c?rev=392699&r1=392698&r2=392699&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/mod_python.c (original)
+++ httpd/mod_python/trunk/src/mod_python.c Sun Apr  9 03:04:59 2006
@@ -344,8 +344,8 @@
     int max_clients;
     int locks;
     int n;
-    char *val;
-    char *mutex_dir;
+    const char *val;
+    const char *mutex_dir;
     py_config *conf;
     
     conf = (py_config *) ap_get_module_config(s->module_config, 
@@ -497,7 +497,7 @@
     /* Determine the directory to use for mutex lock files. 
        See init_mutexes function for more details.
     */
-    char *mutex_dir;
+    const char *mutex_dir;
     py_config *conf;
 
     conf = (py_config *) ap_get_module_config(s->module_config, 

Modified: httpd/mod_python/trunk/src/requestobject.c
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/requestobject.c?rev=392699&r1=392698&r2=392699&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/requestobject.c (original)
+++ httpd/mod_python/trunk/src/requestobject.c Sun Apr  9 03:04:59 2006
@@ -609,8 +609,8 @@
     apr_table_t* table = conf->options;
 
     int i;
-    apr_array_header_t* ah = apr_table_elts(table);
-    apr_table_entry_t* elts = ah->elts;
+    const apr_array_header_t* ah = apr_table_elts(table);
+    apr_table_entry_t* elts = (apr_table_entry_t *) ah->elts;
 
     /*
      * We remove the empty values, since they cannot have been defined
@@ -1729,14 +1729,14 @@
     else if (strcmp(name, "next") == 0) {
         if (!self->next && self->request_rec->next) {
             self->next = MpRequest_FromRequest(self->request_rec->next);
-            ((requestobject*)self->next)->prev = self;
+            ((requestobject*)self->next)->prev = (PyObject *) self;
         }
         result = self->next;
     }
     else if (strcmp(name, "prev") == 0) {
         if (!self->prev && self->request_rec->prev) {
             self->prev = MpRequest_FromRequest(self->request_rec->prev);
-            ((requestobject*)self->prev)->next = self;
+            ((requestobject*)self->prev)->next = (PyObject *) self;
         }
         result = self->prev;
     }
@@ -1838,7 +1838,7 @@
 
 #ifndef CLEAR_REQUEST_MEMBER 
 #define CLEAR_REQUEST_MEMBER(member)\
-    tmp = member;\
+    tmp = (PyObject *) member;\
     member = NULL;\
     Py_XDECREF(tmp)
 #endif