aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-exec.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-11-10 00:14:22 +0000
committerBruce Momjian <bruce@momjian.us>2002-11-10 00:14:22 +0000
commit4ca28eb7c72e65e1a4f3a4e6b7d35a56e2b69d5c (patch)
tree06f85e9c602f422305c5109c0ae2bf8e5a35bb6a /src/interfaces/libpq/fe-exec.c
parent3eabc4490ecbf6b9845917811cf930af41aff845 (diff)
downloadpostgresql-4ca28eb7c72e65e1a4f3a4e6b7d35a56e2b69d5c.tar.gz
postgresql-4ca28eb7c72e65e1a4f3a4e6b7d35a56e2b69d5c.zip
I just discovered, that there is missing a const when passing a buffer
to PQescapeBytea and PQunescapeBytea. I fixed it and tried to create a usable diff (I'm not so familar to diff). Tommi M?kitalo
Diffstat (limited to 'src/interfaces/libpq/fe-exec.c')
-rw-r--r--src/interfaces/libpq/fe-exec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 214f2929fd1..cd48ee38a1c 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.122 2002/09/04 20:31:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.123 2002/11/10 00:14:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -118,9 +118,9 @@ PQescapeString(char *to, const char *from, size_t length)
* anything >= 0x80 ---> \\ooo (where ooo is an octal expression)
*/
unsigned char *
-PQescapeBytea(unsigned char *bintext, size_t binlen, size_t *bytealen)
+PQescapeBytea(const unsigned char *bintext, size_t binlen, size_t *bytealen)
{
- unsigned char *vp;
+ const unsigned char *vp;
unsigned char *rp;
unsigned char *result;
size_t i;
@@ -202,12 +202,12 @@ PQescapeBytea(unsigned char *bintext, size_t binlen, size_t *bytealen)
* 6 \\
*/
unsigned char *
-PQunescapeBytea(unsigned char *strtext, size_t *retbuflen)
+PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
{
size_t buflen;
unsigned char *buffer,
- *sp,
*bp;
+ const unsigned char *sp;
unsigned int state = 0;
if (strtext == NULL)