return z;
}
-static inline zval *php_http_zsep(zend_bool add_ref, int type, zval *z) {
+static inline zval *php_http_zsep(zend_bool add_ref, int type, zval *z)
+{
if (add_ref) {
Z_ADDREF_P(z);
}
return z;
}
+static inline STATUS php_http_ini_entry(const char *name_str, size_t name_len, const char **value_str, size_t *value_len, zend_bool orig TSRMLS_DC)
+{
+ zend_ini_entry *ini_entry;
+
+ if (SUCCESS == zend_hash_find(EG(ini_directives), name_str, name_len + 1, (void *) &ini_entry)) {
+ if (orig && ini_entry->modified) {
+ *value_str = ini_entry->orig_value;
+ *value_len = (size_t) ini_entry->orig_value_length;
+ } else {
+ *value_str = ini_entry->value;
+ *value_len = (size_t) ini_entry->value_length;
+ }
+ return SUCCESS;
+ }
+ return FAILURE;
+}
/* return bool (v == SUCCESS) */
#define RETVAL_SUCCESS(v) RETVAL_BOOL(SUCCESS == (v))
} php_http_array_hashkey_t;
#define php_http_array_hashkey_init(dup) {NULL, 0, 0, (dup), 0}
+static inline void php_http_array_hashkey_stringify(php_http_array_hashkey_t *key)
+{
+ if (key->type != HASH_KEY_IS_STRING) {
+ key->len = spprintf(&key->str, 0, "%lu", key->num) + 1;
+ }
+}
+
+static inline void php_http_array_hashkey_stringfree(php_http_array_hashkey_t *key)
+{
+ if (key->type != HASH_KEY_IS_STRING || key->dup) {
+ STR_FREE(key->str);
+ }
+}
+
#define FOREACH_VAL(pos, array, val) FOREACH_HASH_VAL(pos, HASH_OF(array), val)
#define FOREACH_HASH_VAL(pos, hash, val) \
for ( zend_hash_internal_pointer_reset_ex(hash, &pos); \