comparison _mysql_results.c @ 53:4bfc4e612de0 MySQLdb

don't leak special-case tuples (present in unicode modes), backport from 1.2br
author kylev
date Mon, 23 Feb 2009 23:46:37 +0000
parents 28e9be1ca559
children
comparison
equal deleted inserted replaced
52:4aaed7e1d782 53:4bfc4e612de0
72 pmask = PyTuple_GET_ITEM(t, 0); 72 pmask = PyTuple_GET_ITEM(t, 0);
73 fun2 = PyTuple_GET_ITEM(t, 1); 73 fun2 = PyTuple_GET_ITEM(t, 1);
74 if (PyInt_Check(pmask)) { 74 if (PyInt_Check(pmask)) {
75 mask = PyInt_AS_LONG(pmask); 75 mask = PyInt_AS_LONG(pmask);
76 if (mask & fields[i].flags) { 76 if (mask & fields[i].flags) {
77 Py_DECREF(t);
77 break; 78 break;
78 } 79 }
79 else { 80 else {
80 continue; 81 goto cleanup;
81 } 82 }
82 } else { 83 } else {
84 Py_DECREF(t);
83 break; 85 break;
84 } 86 }
85 } 87 }
86 cleanup: 88 cleanup:
87 Py_DECREF(t); 89 Py_DECREF(t);