#include <php.h>
#include <SAPI.h>
-#include <ext/raphf/php_raphf.h>
-#include <ext/propro/php_propro.h>
+#include <ext/raphf/php_raphf_api.h>
+#include <ext/propro/php_propro_api.h>
#include <ext/standard/php_string.h>
#include <ext/spl/spl_iterators.h>
#include <ext/date/php_date.h>
/* url options */
#if PHP_HTTP_CURL_VERSION(7,42,0)
- php_http_option_register(registry, ZEND_STRL("path_as_is"), CURLOPT_PATH_AS_IS, IS_BOOL);
+ php_http_option_register(registry, ZEND_STRL("path_as_is"), CURLOPT_PATH_AS_IS, _IS_BOOL);
#endif
/* proxy */
static int php_http_negotiate_sort(const void *first, const void *second)
{
- zval result;
Bucket *b1 = (Bucket *) first, *b2 = (Bucket *) second;
+ int result = numeric_compare_function(&b1->val, &b2->val);
- if (numeric_compare_function(&result, &b1->val, &b2->val)!= SUCCESS) {
- return 0;
- }
- return (Z_LVAL(result) > 0 ? -1 : (Z_LVAL(result) < 0 ? 1 : 0));
+ return (result > 0 ? -1 : (result < 0 ? 1 : 0));
}
#define M_PRI 5
zval_dtor(&arr);
zend_hash_sort(result, php_http_negotiate_sort, 0);
}
-
+
return result;
}