mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Incref an object which will be held forever in a static var
This commit is contained in:
parent
e9c476266c
commit
66d5c6da07
|
@ -278,6 +278,7 @@ typecast_init(PyObject *dict)
|
||||||
|
|
||||||
/* export binary object */
|
/* export binary object */
|
||||||
if (typecast_builtins[i].values == typecast_BINARY_types) {
|
if (typecast_builtins[i].values == typecast_BINARY_types) {
|
||||||
|
Py_INCREF((PyObject *)t);
|
||||||
psyco_default_binary_cast = (PyObject *)t;
|
psyco_default_binary_cast = (PyObject *)t;
|
||||||
}
|
}
|
||||||
Py_DECREF((PyObject *)t);
|
Py_DECREF((PyObject *)t);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user