X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_persistent_handle_api.c;h=84f1b48960fdcfbfe6cdacf55fcf26be372ce28d;hp=0f84ecc205a445c4cd114ce2863fe8a71ee169bb;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=2296badf107bded5e8ca4d45fdd8ef0f6e5b1d5b diff --git a/http_persistent_handle_api.c b/http_persistent_handle_api.c index 0f84ecc..84f1b48 100644 --- a/http_persistent_handle_api.c +++ b/http_persistent_handle_api.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2007, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -230,7 +230,7 @@ PHP_HTTP_API STATUS _http_persistent_handle_provide_ex(const char *name_str, siz fprintf(stderr, "PROVIDE: %s\n", name_str); #endif - if (SUCCESS == zend_hash_add(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider, sizeof(http_persistent_handle_provider), NULL)) { + if (SUCCESS == zend_hash_add(&http_persistent_handles_hash, HTTP_ZAPI_CONST_CAST(char *) name_str, name_len+1, (void *) &provider, sizeof(http_persistent_handle_provider), NULL)) { status = SUCCESS; } } @@ -246,7 +246,7 @@ PHP_HTTP_API STATUS _http_persistent_handle_acquire_ex(const char *name_str, siz *handle = NULL; LOCK(); - if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider)) { + if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, HTTP_ZAPI_CONST_CAST(char *) name_str, name_len+1, (void *) &provider)) { status = http_persistent_handle_do_acquire(provider, handle TSRMLS_CC); } UNLOCK(); @@ -267,7 +267,7 @@ PHP_HTTP_API STATUS _http_persistent_handle_release_ex(const char *name_str, siz #endif LOCK(); - if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider)) { + if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, HTTP_ZAPI_CONST_CAST(char *) name_str, name_len+1, (void *) &provider)) { status = http_persistent_handle_do_release(provider, handle TSRMLS_CC); } UNLOCK(); @@ -286,7 +286,7 @@ PHP_HTTP_API STATUS _http_persistent_handle_accrete_ex(const char *name_str, siz *new_handle = NULL; LOCK(); - if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider)) { + if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, HTTP_ZAPI_CONST_CAST(char *) name_str, name_len+1, (void *) &provider)) { status = http_persistent_handle_do_accrete(provider, old_handle, new_handle TSRMLS_CC); } UNLOCK(); @@ -306,7 +306,7 @@ PHP_HTTP_API void _http_persistent_handle_cleanup_ex(const char *name_str, size_ LOCK(); if (name_str && name_len) { - if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider)) { + if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, HTTP_ZAPI_CONST_CAST(char *) name_str, name_len+1, (void *) &provider)) { if (current_ident_only) { if ((list = http_persistent_handle_list_find(provider TSRMLS_CC))) { http_persistent_handle_list_dtor(list, provider->dtor);