Update of /cvsroot/pypgsql/pypgsql
In directory usw-pr-cvs1:/tmp/cvs-serv2564
Modified Files:
pgint2object.c pglargeobject.c
Log Message:
03NOV2001 bga Closed some memory leaks in PgLargeObject. These leaks had a
low probability of occuring.
--- Cleaned up some comments in pgint2object.c
Index: pgint2object.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/pgint2object.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pgint2object.c 2001/10/05 08:22:18 1.10
--- pgint2object.c 2001/11/04 05:36:03 1.11
***************
*** 665,669 ****
/* Now that the numbers are the same type, we check to see if */
/* they are PgInt2s. If not, we call the remainder method of */
! /* the type that they were coerced into. */
if (!PgInt2_Check(v1))
--- 665,669 ----
/* Now that the numbers are the same type, we check to see if */
/* they are PgInt2s. If not, we call the remainder method of */
! /* the type that they were coerced into. */
if (!PgInt2_Check(v1))
Index: pglargeobject.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/pglargeobject.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pglargeobject.c 2001/10/13 20:40:35 1.10
--- pglargeobject.c 2001/11/04 05:36:03 1.11
***************
*** 30,33 ****
--- 30,35 ----
| Date Ini Description |
| --------- --- ------------------------------------------------------- |
+ | 03NOV2001 bga Closed a couple of possible memory leaks. These leaks |
+ | had a low probability of occuring. |
| 13OCT2001 bga Added support for the pickling of large objects. |
| In particular, a method was added to retrieve the info |
***************
*** 1068,1077 ****
--- 1070,1086 ----
if ((myargs = Py_BuildValue("()")) == (PyObject *)NULL)
+ {
+ Py_DECREF(listObject);
return (PyObject *)NULL;
+ }
for (;;)
{
if (!(item = PgLo_readline(self, myargs)))
+ {
+ Py_DECREF(listObject);
+ Py_DECREF(myargs);
return (PyObject *)NULL;
+ }
if ((sz = PyString_Size(item)) == 0)
***************
*** 1161,1165 ****
for (i = 0; i < lsize; i++)
{
! item = getitem(list, i);
if (!PyString_Check(item))
{
--- 1170,1174 ----
for (i = 0; i < lsize; i++)
{
! item = getitem(list, i); /* Borrowed Reference */
if (!PyString_Check(item))
{
|