view src/postgresql.h @ 578:190b164ddcac

[xemacs-hg @ 2001-05-25 11:26:50 by ben] device-msw.c, eldap.c, emodules.c, hpplay.c, process-unix.c, sound.h, tooltalk.c, win32.c: Revert Martin's attempted compile-warnings fix. It does fix the warnings, but not the right way. We are trying to eliminate the raw use of `char' and `unsigned char' absolutely everywhere. There is never an occasion to reintroduce these. buffer.h: Instead, we fix these macros so they don't care about the type of their lvalues. We already do this for the non-C-string equivalents of these, and it's correct because it should be OK to pass in an SBufbyte *, for example. In any case, we do not need any type-correctness checking here -- errors will be caught for sure as soon as we remove the -Wno-sign-compare switch. mule-charset.c: Use invalid_argument, not generic signal_error (Qerror, ). alloc.c, chartab.c, console-gtk.c, console-msw.c, console-stream.c, console-stream.h, console-tty.c, console-tty.h, console-x.c, console.c, console.h, device-x.c, device.c, elhash.c, eval.c, faces.c, faces.h, fns.c, glyphs.c, glyphs.h, gui.c, gui.h, lisp.h, lread.c, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, process-unix.c, rangetab.c, search.c, specifier.c, toolbar.c, window.c, window.h: Rename Error_behavior to Error_Behavior, to be consistent with general naming practices (Lisp_Object, Char_Binary, etc.).
author ben
date Fri, 25 May 2001 11:27:01 +0000
parents abe6d1db359e
children af57a77cbc92
line wrap: on
line source

/*
  postgresql.h -- Emacs Lisp binding to libpq.so
  Copyright (C) 2000 Electrotechnical Laboratory, JAPAN.
  Licensed to the Free Software Foundation.

  Author:  SL Baur <steve@beopen.com>
  Maintainer:  SL Baur <steve@beopen.com>

Please send patches to this file to me first before submitting them to
xemacs-patches.
*/

#ifndef INCLUDED_postgresql_h_
#define INCLUDED_postgresql_h_ 1

#include LIBPQ_FE_H_FILE /* main PostgreSQL header file */

#define BLCKSZ 8192 /* size of a default Postgres disk block */
/*
  This file contains the GCC bug workaround code for the private
  LRECORD types.
*/

/* PGconn is an opaque object and we need to be able to store them in
   Lisp code because libpq supports multiple connections.
*/
struct Lisp_PGconn
{
  struct lcrecord_header header;
  PGconn *pgconn;
};
typedef struct Lisp_PGconn Lisp_PGconn;

DECLARE_LRECORD (pgconn, Lisp_PGconn);

#define XPGCONN(x) XRECORD (x, pgconn, Lisp_PGconn)
#define XSETPGCONN(x, p) XSETRECORD (x, p, pgconn)
#define PGCONNP(x) RECORDP (x, pgconn)
#define CHECK_PGCONN(x) CHECK_RECORD (x, pgconn)
#define CONCHECK_PGCONN(x) CONCHECK_RECORD (x, pgconn)

/****/

/* PGresult is an opaque object and we need to be able to store them in
   Lisp code.
*/
struct Lisp_PGresult
{
  struct lcrecord_header header;
  PGresult *pgresult;
};
typedef struct Lisp_PGresult Lisp_PGresult;

DECLARE_LRECORD (pgresult, Lisp_PGresult);

#define XPGRESULT(x) XRECORD (x, pgresult, Lisp_PGresult)
#define XSETPGRESULT(x, p) XSETRECORD (x, p, pgresult)
#define PGRESULTP(x) RECORDP (x, pgresult)
#define CHECK_PGRESULT(x) CHECK_RECORD (x, pgresult)
#define CONCHECK_PGRESULT(x) CONCHECK_RECORD (x, pgresult)

#endif /* INCLUDED_postgresql_h_ */