View | Details | Raw Unified | Return to bug 49115
Collapse All | Expand All

(-)mod_python-2.7.8/src/_apachemodule.c (-25 / +40 lines)
Lines 44-50 Link Here
44
 *
44
 *
45
 * _apachemodule.c 
45
 * _apachemodule.c 
46
 *
46
 *
47
 * $Id: _apachemodule.c,v 1.9 2001/05/28 20:00:41 gtrubetskoy Exp $
47
 * $Id: _apachemodule.c,v 1.9.2.1 2003/12/08 04:36:10 grisha Exp $
48
 *
48
 *
49
 */
49
 */
50
50
Lines 150-160 Link Here
150
	    i++;
150
	    i++;
151
	    j++;
151
	    j++;
152
	}
152
	}
153
	_PyString_Resize(&pair, j);
154
	cpair = PyString_AS_STRING(pair);
155
153
156
	PyList_Append(pairs, pair);
154
        if (j) {
157
	Py_DECREF(pair);
155
            _PyString_Resize(&pair, j);
156
            if (pair)
157
                PyList_Append(pairs, pair);
158
        }
159
160
	Py_XDECREF(pair);
158
	i++;
161
	i++;
159
    }
162
    }
160
163
Lines 218-243 Link Here
218
	    ap_unescape_url(cval);
221
	    ap_unescape_url(cval);
219
222
220
	    _PyString_Resize(&key, strlen(ckey));
223
	    _PyString_Resize(&key, strlen(ckey));
221
	    ckey = PyString_AS_STRING(key);
222
	    _PyString_Resize(&val, strlen(cval));
224
	    _PyString_Resize(&val, strlen(cval));
223
	    cval = PyString_AS_STRING(val);
225
            
226
            if (key && val) {
227
228
                ckey = PyString_AS_STRING(key);
229
                cval = PyString_AS_STRING(val);
224
	
230
	
225
	    if (PyMapping_HasKeyString(dict, ckey)) {
231
                if (PyMapping_HasKeyString(dict, ckey)) {
226
		PyObject *list;
232
                    PyObject *list;
227
		list = PyDict_GetItem(dict, key);
233
                    list = PyDict_GetItem(dict, key);
228
		PyList_Append(list, val);
234
                    PyList_Append(list, val);
229
		/* PyDict_GetItem is a borrowed ref, no decref */
235
                    /* PyDict_GetItem is a borrowed ref, no decref */
230
	    }
236
                }
231
	    else {
237
                else {
232
		PyObject *list;
238
                    PyObject *list;
233
		list = Py_BuildValue("[O]", val);
239
                    list = Py_BuildValue("[O]", val);
234
		PyDict_SetItem(dict, key, list);
240
                    PyDict_SetItem(dict, key, list);
235
		Py_DECREF(list);
241
                    Py_DECREF(list);
236
	    }
242
                }
243
            }
237
	}
244
	}
238
245
239
	Py_DECREF(key);
246
	Py_XDECREF(key);
240
	Py_DECREF(val);
247
	Py_XDECREF(val);
241
248
242
	n++;
249
	n++;
243
    }
250
    }
Lines 292-297 Link Here
292
	    i++;
299
	    i++;
293
	    j++;
300
	    j++;
294
	}
301
	}
302
303
        if (j == 0) {
304
            Py_XDECREF(pair);
305
            i++;
306
            continue;
307
        }
308
295
	cpair[j] = '\0';
309
	cpair[j] = '\0';
296
	_PyString_Resize(&pair, j);
310
	_PyString_Resize(&pair, j);
297
	cpair = PyString_AS_STRING(pair);
311
	cpair = PyString_AS_STRING(pair);
Lines 337-348 Link Here
337
	    _PyString_Resize(&key, strlen(ckey));
351
	    _PyString_Resize(&key, strlen(ckey));
338
	    _PyString_Resize(&val, strlen(cval));
352
	    _PyString_Resize(&val, strlen(cval));
339
353
340
	    PyList_Append(pairs, Py_BuildValue("(O,O)", key, val));
354
            if (key && val)
355
                PyList_Append(pairs, Py_BuildValue("(O,O)", key, val));
341
356
342
	}
357
	}
343
	Py_DECREF(pair);
358
	Py_XDECREF(pair);
344
	Py_DECREF(key);
359
	Py_XDECREF(key);
345
	Py_DECREF(val);
360
	Py_XDECREF(val);
346
	i++;
361
	i++;
347
    }
362
    }
348
363
(-)mod_python-2.7.8/src/include/mod_python.h (-1 / +7 lines)
Lines 47-53 Link Here
47
 *
47
 *
48
 * mod_python.h 
48
 * mod_python.h 
49
 *
49
 *
50
 * $Id: mod_python.h,v 1.13 2000/12/13 05:24:08 gtrubetskoy Exp $
50
 * $Id: mod_python.h,v 1.13.2.1 2003/12/08 04:36:10 grisha Exp $
51
 *
51
 *
52
 * See accompanying documentation and source code comments 
52
 * See accompanying documentation and source code comments 
53
 * for details.
53
 * for details.
Lines 117-122 Link Here
117
#define SLASH_S "/"
117
#define SLASH_S "/"
118
#endif
118
#endif
119
119
120
/* python 2.3 no longer defines LONG_LONG, it defines PY_LONG_LONG */
121
#ifndef LONG_LONG
122
#define LONG_LONG PY_LONG_LONG
123
#endif
124
125
120
PyObject *Mp_ServerReturn;
126
PyObject *Mp_ServerReturn;
121
127
122
/* structure to hold interpreter data */
128
/* structure to hold interpreter data */
(-)mod_python-2.7.8/src/include/mpversion.h (-2 / +2 lines)
Lines 1-6 Link Here
1
#define MPV_MAJOR 2
1
#define MPV_MAJOR 2
2
#define MPV_MINOR 7
2
#define MPV_MINOR 7
3
#define MPV_PATCH 8
3
#define MPV_PATCH 10
4
#define MPV_BUILD 0
4
#define MPV_BUILD 0
5
5
6
#define MPV_STRING "2.7.8"
6
#define MPV_STRING "2.7.10"

Return to bug 49115