File: mysqldb.patch

package info (click to toggle)
pypy3 7.0.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 111,848 kB
  • sloc: python: 1,291,746; ansic: 74,281; asm: 5,187; cpp: 3,017; sh: 2,533; makefile: 544; xml: 243; lisp: 45; csh: 21; awk: 4
file content (57 lines) | stat: -rw-r--r-- 1,264 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
*** _mysql-orig.c	2009-03-30 18:59:28.000000000 -0400
--- _mysql.c	2010-05-13 20:10:19.000000000 -0400
***************
*** 413,418 ****
--- 413,419 ----
  					PyObject *pmask=NULL;
  					pmask = PyTuple_GET_ITEM(t, 0);
  					fun2 = PyTuple_GET_ITEM(t, 1);
+ 					Py_XINCREF(fun2);
  					if (PyInt_Check(pmask)) {
  						mask = PyInt_AS_LONG(pmask);
  						if (mask & fields[i].flags) {
***************
*** 430,437 ****
  			  cleanup:
  				Py_DECREF(t);
  			}
! 			if (!fun2) fun2 = Py_None;
! 			Py_INCREF(fun2);
  			Py_DECREF(fun);
  			fun = fun2;
  		}
--- 431,440 ----
  			  cleanup:
  				Py_DECREF(t);
  			}
! 			if (!fun2) {
! 			    fun2 = Py_None;
!     			Py_INCREF(fun2);
! 			}
  			Py_DECREF(fun);
  			fun = fun2;
  		}
***************
*** 1053,1059 ****
--- 1056,1064 ----
  				"no default type converter defined");
  		goto error;
  	}
+     Py_INCREF(d);
  	quoted = PyObject_CallFunction(itemconv, "OO", item, d);
+     Py_DECREF(d);
  	Py_DECREF(itemconv);
  error:
  	return quoted;
***************
*** 2785,2790 ****
--- 2790,2798 ----
  	if (!(e = PyDict_GetItemString(edict, name)))
  		return NULL;
  	if (PyDict_SetItemString(dict, name, e)) return NULL;
+ #ifdef PYPY_VERSION
+     Py_INCREF(e);
+ #endif
  	return e;
  }