Update of /cvsroot/pypgsql/pypgsql
In directory usw-pr-cvs1:/tmp/cvs-serv2306
Modified Files:
pgconnection.c
Log Message:
20SEP2001 bga Fixed a bug I introduced into pgFixEsc.
Index: pgconnection.c
===================================================================
RCS file: /cvsroot/pypgsql/pypgsql/pgconnection.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pgconnection.c 2001/09/21 03:00:24 1.6
--- pgconnection.c 2001/09/21 03:46:31 1.7
***************
*** 35,38 ****
--- 35,39 ----
| 127, then the escape sequence is replaced by the actual |
| character. This should fix the reported problem. |
+ | --- Fixed a bug I introduced into pgFixEsc. |
| 19SEP2001 bga Re-ordered the items in PgConnection_members so that |
| the attributes handled directly by PgConnection_getattr |
***************
*** 110,139 ****
if (*p == 'x' || *p == 'X')
{
! p++;
! xbuf[0] = *p++;
! xbuf[1] = *p++;
v = strtol(xbuf, &e, 16);
if (e == (xbuf + 2))
{
! s[2] = (v & 7) + '0';
v >>= 3;
! s[1] = (v & 7) + '0';
v >>= 3;
! s[0] = (v & 7) + '0';
}
- s += 3;
}
else if (isdigit(*p))
{
! obuf[0] = *p++;
! obuf[1] = *p++;
! obuf[2] = *p++;
v = strtol(obuf, &e, 8);
! if ((e == (obuf + 3)) && (v > 127))
{
s[-1] = (char)v;
}
- else
- s += 3;
}
}
--- 111,138 ----
if (*p == 'x' || *p == 'X')
{
! *s++ = *p++;
! xbuf[0] = *s++ = *p++;
! xbuf[1] = *s++ = *p++;
v = strtol(xbuf, &e, 16);
if (e == (xbuf + 2))
{
! s[-1] = (v & 7) + '0';
v >>= 3;
! s[-2] = (v & 7) + '0';
v >>= 3;
! s[-3] = (v & 7) + '0';
}
}
else if (isdigit(*p))
{
! obuf[0] = *s++ = *p++;
! obuf[1] = *s++ = *p++;
! obuf[2] = *s++ = *p++;
v = strtol(obuf, &e, 8);
! if ((e == &obuf[3]) && (v > 127))
{
+ s -= 3;
s[-1] = (char)v;
}
}
}
|