Update of /cvsroot/pypgsql/pypgsql
In directory usw-pr-cvs1:/tmp/cvs-serv18257
Modified Files:
pglargeobject.c
Log Message:
22SEP2001 bga Ensure that INV_BIN is not in the mode variable when lo_open is
called.
--- Removed static declaration from validmodes[]. It's now used by
lo_create in pgconnection.c also.
Index: pglargeobject.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/pglargeobject.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** pglargeobject.c 2001/09/06 04:42:21 1.7
--- pglargeobject.c 2001/09/23 04:04:40 1.8
***************
*** 30,33 ****
--- 30,37 ----
| Date Ini Description |
| --------- --- ------------------------------------------------------- |
+ | 22SEP2001 bga Ensure that INV_BIN is not in the mode variable when |
+ | lo_open is called. |
+ | --- Removed static declaration from validmodes[]. It's now |
+ | used by lo_create in pgconnection.c also. |
| 06SEP2001 bga Removed an un-used variable. |
| 30AUG2001 bga Use PyObject_Del() instead of PyMem_Free() in dealloc() |
***************
*** 326,330 ****
#define INV_BIN 0x00010000
! static struct {
char *name;
int mode;
--- 330,334 ----
#define INV_BIN 0x00010000
! struct {
char *name;
int mode;
***************
*** 419,423 ****
oid = PgLargeObject_Get(self);
! if ((self->lo_fd = lo_open(cnx, oid, mode)) < 0)
{
PyErr_SetString(PyExc_IOError, "can't open PgLargeObject");
--- 423,427 ----
oid = PgLargeObject_Get(self);
! if ((self->lo_fd = lo_open(cnx, oid, (mode & (INV_READ | INV_WRITE)))) < 0)
{
PyErr_SetString(PyExc_IOError, "can't open PgLargeObject");
|