projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
62279bb
)
- fix PHP4 build
author
Michael Wallner
<mike@php.net>
Wed, 14 Dec 2005 10:23:35 +0000
(10:23 +0000)
committer
Michael Wallner
<mike@php.net>
Wed, 14 Dec 2005 10:23:35 +0000
(10:23 +0000)
http_request_api.c
patch
|
blob
|
history
diff --git
a/http_request_api.c
b/http_request_api.c
index 15740732bd33d3cfe48069dbbb91b3e68b4a6ee8..bc1fdbbdb3f3a2b52ad0ff4ef0346b86217ced62 100644
(file)
--- a/
http_request_api.c
+++ b/
http_request_api.c
@@
-831,9
+831,17
@@
static int http_curl_raw_callback(CURL *ch, curl_infotype type, char *data, size
static inline zval *_http_request_option_ex(http_request *r, HashTable *options, char *key, size_t keylen, int type TSRMLS_DC)
{
zval **zoption;
static inline zval *_http_request_option_ex(http_request *r, HashTable *options, char *key, size_t keylen, int type TSRMLS_DC)
{
zval **zoption;
+#ifdef ZEND_ENGINE_2
ulong h = zend_get_hash_value(key, keylen);
ulong h = zend_get_hash_value(key, keylen);
-
- if (!options || (SUCCESS != zend_hash_quick_find(options, key, keylen, h, (void **) &zoption))) {
+#endif
+
+ if (!options ||
+#ifdef ZEND_ENGINE_2
+ (SUCCESS != zend_hash_quick_find(options, key, keylen, h, (void **) &zoption))
+#else
+ (SUCCESS != zend_hash_find(options, key, keylen, (void **) &zoption))
+#endif
+ ) {
return NULL;
}
return NULL;
}
@@
-852,9
+860,14
@@
static inline zval *_http_request_option_ex(http_request *r, HashTable *options,
}
ZVAL_ADDREF(*zoption);
}
ZVAL_ADDREF(*zoption);
+#ifdef ZEND_ENGINE_2
_zend_hash_quick_add_or_update(&r->_cache.options, key, keylen, h, zoption, sizeof(zval *), NULL,
zend_hash_quick_exists(&r->_cache.options, key, keylen, h)?HASH_UPDATE:HASH_ADD ZEND_FILE_LINE_CC);
_zend_hash_quick_add_or_update(&r->_cache.options, key, keylen, h, zoption, sizeof(zval *), NULL,
zend_hash_quick_exists(&r->_cache.options, key, keylen, h)?HASH_UPDATE:HASH_ADD ZEND_FILE_LINE_CC);
-
+#else
+ zend_hash_add_or_update(&r->_cache.options, key, keylen, zoption, sizeof(zval *), NULL,
+ zend_hash_exists(&r->_cache.options, key, keylen)?HASH_UPDATE:HASH_ADD);
+#endif
+
return *zoption;
}
/* }}} */
return *zoption;
}
/* }}} */