Mercurial > hg > xemacs-beta
comparison modules/postgresql/postgresql.c @ 5143:186aebf7f6c6
merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Sat, 13 Mar 2010 11:38:54 -0600 |
| parents | f965e31a35f0 |
| children | 8bda66cd0414 |
comparison
equal
deleted
inserted
replaced
| 5140:e5380fdaf8f1 | 5143:186aebf7f6c6 |
|---|---|
| 251 strcpy (buf, "#<PGconn BAD>"); /* evil! */ | 251 strcpy (buf, "#<PGconn BAD>"); /* evil! */ |
| 252 else | 252 else |
| 253 strcpy (buf, "#<PGconn connecting>"); /* evil! */ | 253 strcpy (buf, "#<PGconn connecting>"); /* evil! */ |
| 254 | 254 |
| 255 if (print_readably) | 255 if (print_readably) |
| 256 printing_unreadable_object ("%s", buf); | 256 printing_unreadable_object_fmt ("%s", buf); |
| 257 else | 257 else |
| 258 write_cistring (printcharfun, buf); | 258 write_cistring (printcharfun, buf); |
| 259 } | 259 } |
| 260 | 260 |
| 261 static Lisp_PGconn * | 261 static Lisp_PGconn * |
| 293 } | 293 } |
| 294 | 294 |
| 295 #else /* not RUNNING_XEMACS_21_4 */ | 295 #else /* not RUNNING_XEMACS_21_4 */ |
| 296 | 296 |
| 297 static void | 297 static void |
| 298 finalize_pgconn (void *header) | 298 finalize_pgconn (Lisp_Object obj) |
| 299 { | 299 { |
| 300 Lisp_PGconn *pgconn = (Lisp_PGconn *)header; | 300 Lisp_PGconn *pgconn = XPGCONN (obj); |
| 301 | 301 |
| 302 if (pgconn->pgconn) | 302 if (pgconn->pgconn) |
| 303 { | 303 { |
| 304 PQfinish (pgconn->pgconn); | 304 PQfinish (pgconn->pgconn); |
| 305 pgconn->pgconn = (PGconn *)NULL; | 305 pgconn->pgconn = (PGconn *)NULL; |
| 399 } | 399 } |
| 400 else | 400 else |
| 401 strcpy (buf, "#<PGresult DEAD>"); /* evil! */ | 401 strcpy (buf, "#<PGresult DEAD>"); /* evil! */ |
| 402 | 402 |
| 403 if (print_readably) | 403 if (print_readably) |
| 404 printing_unreadable_object ("%s", buf); | 404 printing_unreadable_object_fmt ("%s", buf); |
| 405 else | 405 else |
| 406 write_cistring (printcharfun, buf); | 406 write_cistring (printcharfun, buf); |
| 407 } | 407 } |
| 408 | 408 |
| 409 #undef RESULT_TUPLES_FMT | 409 #undef RESULT_TUPLES_FMT |
| 445 } | 445 } |
| 446 | 446 |
| 447 #else /* not RUNNING_XEMACS_21_4 */ | 447 #else /* not RUNNING_XEMACS_21_4 */ |
| 448 | 448 |
| 449 static void | 449 static void |
| 450 finalize_pgresult (void *header) | 450 finalize_pgresult (Lisp_Object obj) |
| 451 { | 451 { |
| 452 Lisp_PGresult *pgresult = (Lisp_PGresult *)header; | 452 Lisp_PGresult *pgresult = XPGRESULT (obj); |
| 453 | 453 |
| 454 if (pgresult->pgresult) | 454 if (pgresult->pgresult) |
| 455 { | 455 { |
| 456 PQclear (pgresult->pgresult); | 456 PQclear (pgresult->pgresult); |
| 457 pgresult->pgresult = (PGresult *)NULL; | 457 pgresult->pgresult = (PGresult *)NULL; |
