Skip to content

Commit a0e87ad

Browse files
committed
Specify lo_write() to take a _const_ buffer, to match documentation.
1 parent 803d9c3 commit a0e87ad

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/backend/libpq/be-fsstubs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/be-fsstubs.c,v 1.82 2006/04/26 00:34:57 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/be-fsstubs.c,v 1.83 2006/09/07 15:37:25 momjian Exp $
1212
*
1313
* NOTES
1414
* This should be moved to a more appropriate place. It is here
@@ -165,7 +165,7 @@ lo_read(int fd, char *buf, int len)
165165
}
166166

167167
int
168-
lo_write(int fd, char *buf, int len)
168+
lo_write(int fd, const char *buf, int len)
169169
{
170170
int status;
171171

src/backend/storage/large_object/inv_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
*
1919
* IDENTIFICATION
20-
* $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.119 2006/07/31 20:09:05 tgl Exp $
20+
* $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.120 2006/09/07 15:37:25 momjian Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -488,7 +488,7 @@ inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
488488
}
489489

490490
int
491-
inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
491+
inv_write(LargeObjectDesc *obj_desc, const char *buf, int nbytes)
492492
{
493493
int nwritten = 0;
494494
int n;

src/include/libpq/be-fsstubs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/libpq/be-fsstubs.h,v 1.26 2006/03/05 15:58:56 momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/libpq/be-fsstubs.h,v 1.27 2006/09/07 15:37:25 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -41,7 +41,7 @@ extern Datum lo_unlink(PG_FUNCTION_ARGS);
4141
* but too late now...
4242
*/
4343
extern int lo_read(int fd, char *buf, int len);
44-
extern int lo_write(int fd, char *buf, int len);
44+
extern int lo_write(int fd, const char *buf, int len);
4545

4646
/*
4747
* Cleanup LOs at xact commit/abort

src/include/storage/large_object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/storage/large_object.h,v 1.34 2006/04/26 00:34:57 tgl Exp $
11+
* $PostgreSQL: pgsql/src/include/storage/large_object.h,v 1.35 2006/09/07 15:37:25 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -77,6 +77,6 @@ extern int inv_drop(Oid lobjId);
7777
extern int inv_seek(LargeObjectDesc *obj_desc, int offset, int whence);
7878
extern int inv_tell(LargeObjectDesc *obj_desc);
7979
extern int inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes);
80-
extern int inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes);
80+
extern int inv_write(LargeObjectDesc *obj_desc, const char *buf, int nbytes);
8181

8282
#endif /* LARGE_OBJECT_H */

src/interfaces/libpq/fe-lobj.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.58 2006/06/14 17:49:25 tgl Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.59 2006/09/07 15:37:25 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -172,7 +172,7 @@ lo_read(PGconn *conn, int fd, char *buf, size_t len)
172172
* returns the number of bytes written, or -1 on failure.
173173
*/
174174
int
175-
lo_write(PGconn *conn, int fd, char *buf, size_t len)
175+
lo_write(PGconn *conn, int fd, const char *buf, size_t len)
176176
{
177177
PQArgBlock argv[2];
178178
PGresult *res;

src/interfaces/libpq/libpq-fe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.132 2006/08/18 19:52:39 tgl Exp $
10+
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.133 2006/09/07 15:37:25 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -483,7 +483,7 @@ PQprintTuples(const PGresult *res,
483483
extern int lo_open(PGconn *conn, Oid lobjId, int mode);
484484
extern int lo_close(PGconn *conn, int fd);
485485
extern int lo_read(PGconn *conn, int fd, char *buf, size_t len);
486-
extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
486+
extern int lo_write(PGconn *conn, int fd, const char *buf, size_t len);
487487
extern int lo_lseek(PGconn *conn, int fd, int offset, int whence);
488488
extern Oid lo_creat(PGconn *conn, int mode);
489489
extern Oid lo_create(PGconn *conn, Oid lobjId);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy