404
|
1 /*
|
|
2 postgresql.h -- Emacs Lisp binding to libpq.so
|
|
3 Copyright (C) 2000 Electrotechnical Laboratory, JAPAN.
|
|
4 Licensed to the Free Software Foundation.
|
|
5
|
|
6 Author: SL Baur <steve@beopen.com>
|
|
7 Maintainer: SL Baur <steve@beopen.com>
|
|
8
|
|
9 Please send patches to this file to me first before submitting them to
|
|
10 xemacs-patches.
|
|
11 */
|
|
12
|
|
13 #ifndef XEMACS_POSTGRESQL_H__
|
|
14 #define XEMACS_POSTGRESQL_H__ 1
|
|
15
|
|
16 #define BLCKSZ 8192 /* size of a default Postres disk block */
|
|
17 /*
|
|
18 This file contains the GCC bug workaround code for the private
|
|
19 LRECORD types.
|
|
20 */
|
|
21
|
|
22 /* PGconn is an opaque object and we need to be able to store them in
|
|
23 Lisp code because libpq supports multiple connections.
|
|
24 */
|
|
25 struct Lisp_PGconn
|
|
26 {
|
|
27 struct lcrecord_header header;
|
|
28 PGconn *pgconn;
|
|
29 };
|
|
30 typedef struct Lisp_PGconn Lisp_PGconn;
|
|
31
|
|
32 DECLARE_LRECORD (pgconn, Lisp_PGconn);
|
|
33
|
|
34 #define XPGCONN(x) XRECORD (x, pgconn, Lisp_PGconn)
|
|
35 #define XSETPGCONN(x, p) XSETRECORD (x, p, pgconn)
|
|
36 #define PGCONNP(x) RECORDP (x, pgconn)
|
|
37 #define CHECK_PGCONN(x) CHECK_RECORD (x, pgconn)
|
|
38 #define CONCHECK_PGCONN(x) CONCHECK_RECORD (x, pgconn)
|
|
39
|
|
40 /****/
|
|
41
|
|
42 /* PGresult is an opaque object and we need to be able to store them in
|
|
43 Lisp code.
|
|
44 */
|
|
45 struct Lisp_PGresult
|
|
46 {
|
|
47 struct lcrecord_header header;
|
|
48 PGresult *pgresult;
|
|
49 };
|
|
50 typedef struct Lisp_PGresult Lisp_PGresult;
|
|
51
|
|
52 DECLARE_LRECORD (pgresult, Lisp_PGresult);
|
|
53
|
|
54 #define XPGRESULT(x) XRECORD (x, pgresult, Lisp_PGresult)
|
|
55 #define XSETPGRESULT(x, p) XSETRECORD (x, p, pgresult)
|
|
56 #define PGRESULTP(x) RECORDP (x, pgresult)
|
|
57 #define CHECK_PGRESULT(x) CHECK_RECORD (x, pgresult)
|
|
58 #define CONCHECK_PGRESULT(x) CONCHECK_RECORD (x, pgresult)
|
|
59
|
|
60 #endif /* XEMACS_POSTGRESQL_H__ */
|