diff options
| author | Ard Biesheuvel <abies@php.net> | 2003-08-06 12:09:30 +0000 |
|---|---|---|
| committer | Ard Biesheuvel <abies@php.net> | 2003-08-06 12:09:30 +0000 |
| commit | 966663d3a0ea5a0916da0783e0b5ae2448010a48 (patch) | |
| tree | c93ed67ce072d5578b154a65ae7cfe98b031a942 | |
| parent | ccfa0b4f46547658daeebc6edc5058557457e331 (diff) | |
| download | php-git-966663d3a0ea5a0916da0783e0b5ae2448010a48.tar.gz | |
Minor Win32 fixes/cleanups
| -rw-r--r-- | ext/interbase/interbase.c | 13 | ||||
| -rw-r--r-- | ext/interbase/php_interbase.h | 8 |
2 files changed, 8 insertions, 13 deletions
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 7122d799fa..a57a358c40 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -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; diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h index ba1560525d..f4fc80ec17 100644 --- a/ext/interbase/php_interbase.h +++ b/ext/interbase/php_interbase.h @@ -29,14 +29,10 @@ 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, |
