X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_misc.c;h=467988bd1043e738f66ff69a380698d5c0dfaffb;hp=23fb4b553ea28d35bbf51d86768386bbe2a11bff;hb=7a492dc2544d408eb65fd38cb644fd6adde3bbe9;hpb=b3831bc5f19cf32880ea19341c3527f0e9553517 diff --git a/src/php_http_misc.c b/src/php_http_misc.c index 23fb4b5..467988b 100644 --- a/src/php_http_misc.c +++ b/src/php_http_misc.c @@ -19,11 +19,11 @@ void php_http_sleep(double s) { -#if defined(PHP_WIN32) +#if PHP_WIN32 Sleep((DWORD) PHP_HTTP_MSEC(s)); -#elif defined(HAVE_USLEEP) +#elif HAVE_USLEEP usleep(PHP_HTTP_USEC(s)); -#elif defined(HAVE_NANOSLEEP) +#elif HAVE_NANOSLEEP struct timespec req, rem; req.tv_sec = (time_t) s; @@ -87,7 +87,7 @@ int php_http_match(const char *haystack_str, const char *needle_str, int flags) return result; } -char *php_http_pretty_key(register char *key, size_t key_len, zend_bool uctitle, zend_bool xhyphen) +char *php_http_pretty_key(char *key, size_t key_len, zend_bool uctitle, zend_bool xhyphen) { size_t i = 1; int wasalpha; @@ -190,7 +190,7 @@ int php_http_array_apply_append_func(zval *value, int num_args, va_list args, ze if (flags & ARRAY_JOIN_STRINGIFY) { convert_to_string_ex(value); } - Z_ADDREF_P(value); + Z_TRY_ADDREF_P(value); if (data) { if (Z_TYPE_P(data) != IS_ARRAY) {