]> granicus.if.org Git - php/commitdiff
Minor Win32 fixes/cleanups
authorArd Biesheuvel <abies@php.net>
Wed, 6 Aug 2003 12:09:30 +0000 (12:09 +0000)
committerArd Biesheuvel <abies@php.net>
Wed, 6 Aug 2003 12:09:30 +0000 (12:09 +0000)
ext/interbase/interbase.c
ext/interbase/php_interbase.h

index 7122d799fa47f88e3e53ec1b1eacbccc0f49e952..a57a358c408e1c5bd2da73369c22d6a83f688090 100644 (file)
@@ -75,7 +75,8 @@ A lot... */
 #endif
 
 #ifdef ZEND_DEBUG
-#define IBDEBUG(a) php_printf("::: %s (%s:%d)\n", a, __FILE__, __LINE__);
+/* #define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__); */
+#define IBDEBUG(a)
 #else
 #define IBDEBUG(a)
 #endif
@@ -1152,8 +1153,8 @@ static int _php_ibase_alloc_query(ibase_query **ib_queryp, isc_db_handle link, i
                goto _php_ibase_alloc_query_error;
        }
 
-       IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(0));
-       IB_QUERY->out_sqlda->sqln = 0;
+       IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(1));
+       IB_QUERY->out_sqlda->sqln = 1;
        IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
 
        if (isc_dsql_prepare(IB_STATUS, &IB_QUERY->trans, &IB_QUERY->stmt, 0, query, dialect, IB_QUERY->out_sqlda)) {
@@ -1173,8 +1174,8 @@ static int _php_ibase_alloc_query(ibase_query **ib_queryp, isc_db_handle link, i
        }
 
        /* maybe have input placeholders? */
-       IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(0));
-       IB_QUERY->in_sqlda->sqln = 0;
+       IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(1));
+       IB_QUERY->in_sqlda->sqln = 1;
        IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
        if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, IB_QUERY->in_sqlda)) {
                _php_ibase_error(TSRMLS_C);
@@ -1583,7 +1584,7 @@ _php_ibase_exec_error:             /* I'm a bad boy... */
 
 PHP_FUNCTION(ibase_trans)
 {
-       unsigned i, argn, link_cnt = 0, tpb_len = 0;
+       unsigned short i, argn, link_cnt = 0, tpb_len = 0;
        char last_tpb[TPB_MAX_SIZE];
        ibase_db_link **ib_link = NULL;
        ibase_trans *ib_trans;
index ba1560525d85572043d66a6ae77cbad3397e71be..f4fc80ec177ca3f6e8367a78b7537dc33f647c4f 100644 (file)
 extern zend_module_entry ibase_module_entry;
 #define phpext_interbase_ptr &ibase_module_entry
 
-#ifdef PHP_WIN32
-#define PHP_IBASE_API __declspec(dllexport)
 #ifndef ISC_INT64_FORMAT
+#ifdef PHP_WIN32
 #define ISC_INT64_FORMAT "I64"
-#endif
 #else
-#define PHP_IBASE_API
-#ifndef ISC_INT64_FORMAT
 #define ISC_INT64_FORMAT "ll"
 #endif
 #endif
@@ -163,8 +159,6 @@ typedef struct _php_ibase_varchar {
        char var_str[1];
 } IBASE_VCHAR;
 
-/* extern ibase_module php_ibase_module; */
-
 enum php_interbase_option {
        PHP_IBASE_DEFAULT                       = 0,
        PHP_IBASE_TEXT                          = 1,