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/12/08 05:36:10 UTC
cvs commit: httpd-python/src/include mod_python.h mpversion.h
grisha 2003/12/07 20:36:10
Modified: Doc Tag: branch-2-7-7 modpython.tex
src Tag: branch-2-7-7 _apachemodule.c
src/include Tag: branch-2-7-7 mod_python.h mpversion.h
Log:
The empty query fix
Revision Changes Path
No revision
No revision
1.12.2.3 +3 -3 httpd-python/Doc/modpython.tex
Index: modpython.tex
===================================================================
RCS file: /home/cvs/httpd-python/Doc/modpython.tex,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -r1.12.2.2 -r1.12.2.3
--- modpython.tex 19 Apr 2002 18:22:44 -0000 1.12.2.2
+++ modpython.tex 8 Dec 2003 04:36:10 -0000 1.12.2.3
@@ -11,8 +11,8 @@
}
% do not mess with the 2 lines below, they are written by make dist
-\release{2.7.8}
-\date{April 19, 2002}
+\release{2.7.10}
+\date{December 07, 2003}
\makeindex % tell \index to actually write the .idx file
\makemodindex % If this contains a lot of module sections.
@@ -63,4 +63,4 @@
\input{modpython.ind}
-\end{document}
\ No newline at end of file
+\end{document}
No revision
No revision
1.9.2.1 +40 -25 httpd-python/src/_apachemodule.c
Index: _apachemodule.c
===================================================================
RCS file: /home/cvs/httpd-python/src/_apachemodule.c,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -r1.9 -r1.9.2.1
--- _apachemodule.c 28 May 2001 20:00:41 -0000 1.9
+++ _apachemodule.c 8 Dec 2003 04:36:10 -0000 1.9.2.1
@@ -150,11 +150,14 @@
i++;
j++;
}
- _PyString_Resize(&pair, j);
- cpair = PyString_AS_STRING(pair);
- PyList_Append(pairs, pair);
- Py_DECREF(pair);
+ if (j) {
+ _PyString_Resize(&pair, j);
+ if (pair)
+ PyList_Append(pairs, pair);
+ }
+
+ Py_XDECREF(pair);
i++;
}
@@ -218,26 +221,30 @@
ap_unescape_url(cval);
_PyString_Resize(&key, strlen(ckey));
- ckey = PyString_AS_STRING(key);
_PyString_Resize(&val, strlen(cval));
- cval = PyString_AS_STRING(val);
+
+ if (key && val) {
+
+ ckey = PyString_AS_STRING(key);
+ cval = PyString_AS_STRING(val);
- if (PyMapping_HasKeyString(dict, ckey)) {
- PyObject *list;
- list = PyDict_GetItem(dict, key);
- PyList_Append(list, val);
- /* PyDict_GetItem is a borrowed ref, no decref */
- }
- else {
- PyObject *list;
- list = Py_BuildValue("[O]", val);
- PyDict_SetItem(dict, key, list);
- Py_DECREF(list);
- }
+ if (PyMapping_HasKeyString(dict, ckey)) {
+ PyObject *list;
+ list = PyDict_GetItem(dict, key);
+ PyList_Append(list, val);
+ /* PyDict_GetItem is a borrowed ref, no decref */
+ }
+ else {
+ PyObject *list;
+ list = Py_BuildValue("[O]", val);
+ PyDict_SetItem(dict, key, list);
+ Py_DECREF(list);
+ }
+ }
}
- Py_DECREF(key);
- Py_DECREF(val);
+ Py_XDECREF(key);
+ Py_XDECREF(val);
n++;
}
@@ -292,6 +299,13 @@
i++;
j++;
}
+
+ if (j == 0) {
+ Py_XDECREF(pair);
+ i++;
+ continue;
+ }
+
cpair[j] = '\0';
_PyString_Resize(&pair, j);
cpair = PyString_AS_STRING(pair);
@@ -337,12 +351,13 @@
_PyString_Resize(&key, strlen(ckey));
_PyString_Resize(&val, strlen(cval));
- PyList_Append(pairs, Py_BuildValue("(O,O)", key, val));
+ if (key && val)
+ PyList_Append(pairs, Py_BuildValue("(O,O)", key, val));
}
- Py_DECREF(pair);
- Py_DECREF(key);
- Py_DECREF(val);
+ Py_XDECREF(pair);
+ Py_XDECREF(key);
+ Py_XDECREF(val);
i++;
}
No revision
No revision
1.13.2.1 +7 -1 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.13
retrieving revision 1.13.2.1
diff -u -r1.13 -r1.13.2.1
--- mod_python.h 13 Dec 2000 05:24:08 -0000 1.13
+++ mod_python.h 8 Dec 2003 04:36:10 -0000 1.13.2.1
@@ -117,6 +117,12 @@
#define SLASH_S "/"
#endif
+/* python 2.3 no longer defines LONG_LONG, it defines PY_LONG_LONG */
+#ifndef LONG_LONG
+#define LONG_LONG PY_LONG_LONG
+#endif
+
+
PyObject *Mp_ServerReturn;
/* structure to hold interpreter data */
1.8.4.3 +2 -2 httpd-python/src/include/mpversion.h
Index: mpversion.h
===================================================================
RCS file: /home/cvs/httpd-python/src/include/mpversion.h,v
retrieving revision 1.8.4.2
retrieving revision 1.8.4.3
diff -u -r1.8.4.2 -r1.8.4.3
--- mpversion.h 19 Apr 2002 18:21:24 -0000 1.8.4.2
+++ mpversion.h 8 Dec 2003 04:36:10 -0000 1.8.4.3
@@ -1,6 +1,6 @@
#define MPV_MAJOR 2
#define MPV_MINOR 7
-#define MPV_PATCH 8
+#define MPV_PATCH 10
#define MPV_BUILD 0
-#define MPV_STRING "2.7.8"
+#define MPV_STRING "2.7.10"