comp.lang.ada
 help / color / mirror / Atom feed
* sqlite binding
@ 2003-07-07 12:30 Ching Bon Lam
  2003-07-07 14:16 ` Andreas Almroth
  2003-07-11 15:34 ` Michael Erdmann
  0 siblings, 2 replies; 3+ messages in thread
From: Ching Bon Lam @ 2003-07-07 12:30 UTC (permalink / raw)


hello everyone,

I've been trying to make some sort of sqlite binding. SQLite itself is at 
http://www.sqlite.org/ . For now i just want to import the core api 
consisting of three functions (taken from sqlite.h):

-- Code -----------------------------------------------------------------

sqlite *sqlite_open(const char *filename, int mode, char **errmsg);

void sqlite_close(sqlite *);

int sqlite_exec(
  sqlite*,          /* An open database */
  const char *sql,  /* SQL to be executed */
  sqlite_callback,  /* Callback function */
  void *,           /* 1st argument to callback function */
  char **errmsg     /* Error msg written here */
);

-------------------------------------------------------------------------

with:

-- Code -----------------------------------------------------------------

typedef struct sqlite sqlite; /* opaque struct */
typedef int (*sqlite_callback)(void*,int,char**, char**);

-------------------------------------------------------------------------

What I did till now is:

-- Code -----------------------------------------------------------------

-- typedef struct sqlite sqlite; /* opaque struct */
subtype sqlite is Interfaces.C.Extensions.opaque_structure_def;

-------------------------------------------------------------------------

i don't know how to do the rest with the tons of pointers as arguments..
if someone would give me some pointers/guidance/hints, i would be really 
grateful.

greetings,
CBL



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-11 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-07 12:30 sqlite binding Ching Bon Lam
2003-07-07 14:16 ` Andreas Almroth
2003-07-11 15:34 ` Michael Erdmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox