comparison modules/postgresql/postgresql.c @ 5120:d1247f3cc363 ben-lisp-object

latest work on lisp-object workspace; more changes eliminating LCRECORD in place of LISP_OBJECT; now compiles and runs.
author Ben Wing <ben@xemacs.org>
date Mon, 28 Dec 2009 01:15:52 -0600
parents e0db3c197671
children b5df3737028a
comparison
equal deleted inserted replaced
5119:d877c14318b3 5120:d1247f3cc363
88 /* This must be portable with XEmacs 21.1 so long as it is the official 88 /* This must be portable with XEmacs 21.1 so long as it is the official
89 released version of XEmacs and provides the basis of InfoDock. The 89 released version of XEmacs and provides the basis of InfoDock. The
90 interface to lcrecord handling has changed with 21.2, so unfortunately 90 interface to lcrecord handling has changed with 21.2, so unfortunately
91 we will need a few snippets of backwards compatibility code. 91 we will need a few snippets of backwards compatibility code.
92 */ 92 */
93 #if (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION < 2) 93 #if (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION <= 1)
94 #define RUNNING_XEMACS_21_1 1 94 #define RUNNING_XEMACS_21_1 1
95 #elif (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION <= 4)
96 #define RUNNING_XEMACS_21_4 1
95 #endif 97 #endif
96 98
97 /* #define POSTGRES_LO_IMPORT_IS_VOID 1 */ 99 /* #define POSTGRES_LO_IMPORT_IS_VOID 1 */
98 100
99 #include "lisp.h" 101 #include "lisp.h"
238 allocate_pgconn (void) 240 allocate_pgconn (void)
239 { 241 {
240 #ifdef RUNNING_XEMACS_21_1 242 #ifdef RUNNING_XEMACS_21_1
241 Lisp_PGconn *pgconn = ALLOC_LCRECORD_TYPE (Lisp_PGconn, 243 Lisp_PGconn *pgconn = ALLOC_LCRECORD_TYPE (Lisp_PGconn,
242 lrecord_pgconn); 244 lrecord_pgconn);
243 #elif RUNNING_XEMACS_21_4 245 #elif defined (RUNNING_XEMACS_21_4)
244 Lisp_PGconn *pgconn = ALLOC_LCRECORD_TYPE (Lisp_PGconn, 246 Lisp_PGconn *pgconn = ALLOC_LCRECORD_TYPE (Lisp_PGconn,
245 &lrecord_pgconn); 247 &lrecord_pgconn);
246 #else 248 #else
247 Lisp_PGconn *pgconn = XPGCONN (ALLOC_LISP_OBJECT (pgconn)); 249 Lisp_PGconn *pgconn = XPGCONN (ALLOC_LISP_OBJECT (pgconn));
248 #endif 250 #endif
372 allocate_pgresult (void) 374 allocate_pgresult (void)
373 { 375 {
374 #ifdef RUNNING_XEMACS_21_1 376 #ifdef RUNNING_XEMACS_21_1
375 Lisp_PGresult *pgresult = ALLOC_LCRECORD_TYPE (Lisp_PGresult, 377 Lisp_PGresult *pgresult = ALLOC_LCRECORD_TYPE (Lisp_PGresult,
376 lrecord_pgresult); 378 lrecord_pgresult);
377 #elif RUNNING_XEMACS_21_4 379 #elif defined (RUNNING_XEMACS_21_4)
378 Lisp_PGresult *pgresult = ALLOC_LCRECORD_TYPE (Lisp_PGresult, 380 Lisp_PGresult *pgresult = ALLOC_LCRECORD_TYPE (Lisp_PGresult,
379 &lrecord_pgresult); 381 &lrecord_pgresult);
380 #else 382 #else
381 Lisp_PGresult *pgresult = XPGRESULT (ALLOC_LISP_OBJECT (pgresult)); 383 Lisp_PGresult *pgresult = XPGRESULT (ALLOC_LISP_OBJECT (pgresult));
382 #endif 384 #endif
1887 void 1889 void
1888 unload_postgresql (void) 1890 unload_postgresql (void)
1889 { 1891 {
1890 #ifndef RUNNING_XEMACS_21_1 1892 #ifndef RUNNING_XEMACS_21_1
1891 /* Remove defined types */ 1893 /* Remove defined types */
1892 UNDEF_LRECORD_IMPLEMENTATION (pgconn); 1894 UNDEF_LISP_OBJECT (pgconn);
1893 UNDEF_LRECORD_IMPLEMENTATION (pgresult); 1895 UNDEF_LISP_OBJECT (pgresult);
1894 #endif 1896 #endif
1895 1897
1896 /* Remove staticpro'ing of symbols */ 1898 /* Remove staticpro'ing of symbols */
1897 unstaticpro_nodump (&Qpostgresql); 1899 unstaticpro_nodump (&Qpostgresql);
1898 unstaticpro_nodump (&Qpgconnp); 1900 unstaticpro_nodump (&Qpgconnp);