X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_datashare_api.h;h=15818b0b01bfcc5c50ee79970be59c005f229b96;hp=819913727cb838323807ac622381edb93d0c3ff9;hb=refs%2Fheads%2Fv1.7.x;hpb=7bb02fe9ddb59cf972823009aeca5a3ab4df0634 diff --git a/php_http_request_datashare_api.h b/php_http_request_datashare_api.h index 8199137..15818b0 100644 --- a/php_http_request_datashare_api.h +++ b/php_http_request_datashare_api.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -15,27 +15,28 @@ #ifndef PHP_HTTP_REQUEST_DATASHARE_API_H #define PHP_HTTP_REQUEST_DATASHARE_API_H #ifdef HTTP_HAVE_CURL +#ifdef ZEND_ENGINE_2 #ifdef ZTS typedef struct _http_request_datashare_lock_t { CURL *ch; MUTEX_T mx; } http_request_datashare_lock; + +typedef union _http_request_datashare_handle_t { + zend_llist *list; + http_request_datashare_lock *locks; +} http_request_datashare_handle; +#else +typedef struct _http_request_datashare_handle_t { + zend_llist *list; +} http_request_datashare_handle; #endif typedef struct _http_request_datashare_t { CURLSH *ch; zend_bool persistent; -#ifdef ZTS - union { - zend_llist *list; - http_request_datashare_lock *locks; - } handle; -#else - struct { - zend_llist *list; - } handle; -#endif + http_request_datashare_handle handle; } http_request_datashare; #define HTTP_RSHARE_HANDLES(s) ((s)->persistent ? &HTTP_G->request.datashare.handles : (s)->handle.list) @@ -72,6 +73,7 @@ PHP_HTTP_API void _http_request_datashare_free(http_request_datashare **share TS PHP_HTTP_API STATUS _http_request_datashare_set(http_request_datashare *share, const char *option, size_t option_len, zend_bool enable TSRMLS_DC); +#endif #endif #endif