From 3c1060295081c7729853ed6721e1d5fb0f95dc11 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 31 Jan 2007 12:45:56 +0000 Subject: [PATCH] fix compile failure in ZTS mode when collections support is missing --- ext/oci8/oci8.c | 6 ++++++ ext/oci8/oci8_statement.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 1c4967ae49..efaeb5840f 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -89,7 +89,9 @@ static void php_oci_connection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); static void php_oci_pconnection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); static void php_oci_statement_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); static void php_oci_descriptor_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +#ifdef PHP_OCI8_HAVE_COLLECTIONS static void php_oci_collection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +#endif static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC); #ifdef ZTS @@ -646,7 +648,9 @@ PHP_RSHUTDOWN_FUNCTION(oci) { #ifdef ZTS zend_hash_apply_with_argument(&EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_descriptor TSRMLS_CC); +#ifdef PHP_OCI8_HAVE_COLLECTIONS zend_hash_apply_with_argument(&EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_collection TSRMLS_CC); +#endif while (OCI_G(num_statements)) { zend_hash_apply_with_argument(&EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_statement TSRMLS_CC); } @@ -742,6 +746,7 @@ static void php_oci_descriptor_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) php_oci_lob_free(descriptor TSRMLS_CC); } /* }}} */ +#ifdef PHP_OCI8_HAVE_COLLECTIONS /* {{{ php_oci_collection_list_dtor() Collection destructor */ static void php_oci_collection_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) @@ -749,6 +754,7 @@ static void php_oci_collection_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) php_oci_collection *collection = (php_oci_collection *)entry->ptr; php_oci_collection_close(collection TSRMLS_CC); } /* }}} */ +#endif /* }}} */ diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 6621cc7292..64b58da00e 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -863,7 +863,9 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC) Bind zval to the given placeholder */ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len, zval* var, long maxlength, long type, zend_uchar uni_type TSRMLS_DC) { +#ifdef PHP_OCI8_HAVE_COLLECTIONS php_oci_collection *bind_collection = NULL; +#endif php_oci_descriptor *bind_descriptor = NULL; php_oci_statement *bind_statement = NULL; dvoid *oci_desc = NULL; -- 2.40.0