From: Chris Hanson Date: Fri, 6 Jun 2003 20:34:02 +0000 (+0000) Subject: Pass in pair to procedures that connect to server, so that interrupts X-Git-Tag: 20090517-FFI~1896 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=39a407cb94d157f89e7e091f50ba4e2e1c70d9d9;p=mit-scheme.git Pass in pair to procedures that connect to server, so that interrupts can be turned on during the connect. --- diff --git a/v7/src/microcode/prpgsql.c b/v7/src/microcode/prpgsql.c index 415ab22db..b40b5ec5b 100644 --- a/v7/src/microcode/prpgsql.c +++ b/v7/src/microcode/prpgsql.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: prpgsql.c,v 1.1 2003/06/06 19:14:02 cph Exp $ +$Id: prpgsql.c,v 1.2 2003/06/06 20:34:02 cph Exp $ Copyright 2003 Massachusetts Institute of Technology @@ -57,11 +57,22 @@ USA. #define RESULT_TO_UNSPECIFIC(fn) ONE_ARG (ARG_RESULT, fn, ANY_TO_UNSPECIFIC) #define RESULT_TO_STRING(fn) ONE_ARG (ARG_RESULT, fn, char_pointer_to_string) -DEFINE_PRIMITIVE ("PQ-CONNECT-DB", Prim_pq_connect_db, 1, 1, 0) - STRING_TO_UINT (PQconnectdb) +DEFINE_PRIMITIVE ("PQ-CONNECT-DB", Prim_pq_connect_db, 2, 2, 0) +{ + PRIMITIVE_HEADER (2); + CHECK_ARG (2, WEAK_PAIR_P); + SET_PAIR_CDR ((ARG_REF (2)), (ANY_TO_UINT (PQconnectdb (STRING_ARG (1))))); + PRIMITIVE_RETURN (unspecific); +} -DEFINE_PRIMITIVE ("PQ-CONNECT-START", Prim_pq_connect_start, 1, 1, 0) - STRING_TO_UINT (PQconnectStart) +DEFINE_PRIMITIVE ("PQ-CONNECT-START", Prim_pq_connect_start, 2, 2, 0) +{ + PRIMITIVE_HEADER (2); + CHECK_ARG (2, WEAK_PAIR_P); + SET_PAIR_CDR ((ARG_REF (2)), + (ANY_TO_UINT (PQconnectStart (STRING_ARG (1))))); + PRIMITIVE_RETURN (unspecific); +} DEFINE_PRIMITIVE ("PQ-CONNECT-POLL", Prim_pq_connect_poll, 1, 1, 0) CONN_TO_UINT (PQconnectPoll)