diff options
| author | Popa Adrian Marius <mapopa@reea.net> | 2015-02-13 17:55:17 +0200 | 
|---|---|---|
| committer | Popa Adrian Marius <mapopa@reea.net> | 2015-02-13 17:55:17 +0200 | 
| commit | 8f968c5416e721983c0efda25ec1f393c8df662a (patch) | |
| tree | 0500106a29ccc8dbbbdfc28c382a487531f68f08 /ext/interbase/php_ibase_includes.h | |
| parent | 03ded8c7ea9b8c2ee3e18b53fcadc55851b7b43a (diff) | |
| download | php-git-8f968c5416e721983c0efda25ec1f393c8df662a.tar.gz | |
Apply PHP7 firebird fixes after API Cleanup from https://github.com/Jan-E/php-src/commit/8c920a22ac65da485eaf3d2fd27baf2b0406116e
Diffstat (limited to 'ext/interbase/php_ibase_includes.h')
| -rw-r--r-- | ext/interbase/php_ibase_includes.h | 17 | 
1 files changed, 12 insertions, 5 deletions
diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h index 1853c40051..99f3366f50 100644 --- a/ext/interbase/php_ibase_includes.h +++ b/ext/interbase/php_ibase_includes.h @@ -101,7 +101,7 @@ typedef struct event {  	char **events;  	char *event_buffer, *result_buffer;  	zval callback; -	void **thread_ctx; +	void *thread_ctx;  	struct event *event_next;  	enum event_state { NEW, ACTIVE, DEAD } state;  } ibase_event; @@ -128,7 +128,14 @@ enum php_interbase_option {  };  #ifdef ZTS -#define IBG(v) TSRMG(ibase_globals_id, zend_ibase_globals *, v) +#else +#endif + +#ifdef ZTS +# define IBG(v) ZEND_TSRMG(ibase_globals_id, zend_ibase_globals *, v) +# ifdef COMPILE_DL_INTERBASE +ZEND_TSRMLS_CACHE_EXTERN; +# endif  #else  #define IBG(v) (ibase_globals.v)  #endif @@ -155,9 +162,9 @@ void _php_ibase_module_error(char *, ...)  /* determine if a resource is a link or transaction handle */  #define PHP_IBASE_LINK_TRANS(zv, lh, th)													\ -	do { if (!zv) {																		\ -			ZEND_FETCH_RESOURCE2(lh, ibase_db_link *, NULL, IBG(default_link),				\ -				"InterBase link", le_link, le_plink) }										\ +	do { if (!zv) {																			\ +			lh = (ibase_db_link *)zend_fetch_resource2(IBG(default_link),				\ +				"InterBase link", le_link, le_plink); }										\  		else																				\  			_php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, zv, &lh, &th);		\  		if (SUCCESS != _php_ibase_def_trans(lh, &th)) { RETURN_FALSE; }			\  | 
