@@ -97,17 +97,36 @@ column_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9797static int
9898column_init (columnObject * self , PyObject * args , PyObject * kwargs )
9999{
100+ PyObject * name = NULL ;
101+ PyObject * type_code = NULL ;
102+ PyObject * display_size = NULL ;
103+ PyObject * internal_size = NULL ;
104+ PyObject * precision = NULL ;
105+ PyObject * scale = NULL ;
106+ PyObject * null_ok = NULL ;
107+ PyObject * table_oid = NULL ;
108+ PyObject * table_column = NULL ;
109+
100110 static char * kwlist [] = {
101111 "name" , "type_code" , "display_size" , "internal_size" ,
102112 "precision" , "scale" , "null_ok" , "table_oid" , "table_column" , NULL };
103113
104114 if (!PyArg_ParseTupleAndKeywords (args , kwargs , "|OOOOOOOOO" , kwlist ,
105- & self -> name , & self -> type_code , & self -> display_size ,
106- & self -> internal_size , & self -> precision , & self -> scale ,
107- & self -> null_ok , & self -> table_oid , & self -> table_column )) {
115+ & name , & type_code , & display_size , & internal_size , & precision ,
116+ & scale , & null_ok , & table_oid , & table_column )) {
108117 return -1 ;
109118 }
110119
120+ Py_XINCREF (name ); self -> name = name ;
121+ Py_XINCREF (type_code ); self -> type_code = type_code ;
122+ Py_XINCREF (display_size ); self -> display_size = display_size ;
123+ Py_XINCREF (internal_size ); self -> internal_size = internal_size ;
124+ Py_XINCREF (precision ); self -> precision = precision ;
125+ Py_XINCREF (scale ); self -> scale = scale ;
126+ Py_XINCREF (null_ok ); self -> null_ok = null_ok ;
127+ Py_XINCREF (table_oid ); self -> table_oid = table_oid ;
128+ Py_XINCREF (table_column ); self -> table_column = table_column ;
129+
111130 return 0 ;
112131}
113132
0 commit comments