|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-19 14:48 UTC] jason at xlntads dot com
[2009-02-19 17:45 UTC] andrei@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 12:00:01 2025 UTC |
Description: ------------ Patch for compilation on ZTS enabled php builds: Reproduce code: --------------- *** memcached-0.1.4/php_memcached.c 2009-02-13 15:58:54.000000000 -0500 --- memcached-0.1.4-zts/php_memcached.c 2009-02-19 14:29:07.000000000 -0500 *************** *** 346,352 **** status = memcached_mget_by_key(i_obj->memc, server_key, server_key_len, &key, &key_len, 1); ! if (php_memc_handle_error(status) < 0) { RETURN_FALSE; } --- 346,352 ---- status = memcached_mget_by_key(i_obj->memc, server_key, server_key_len, &key, &key_len, 1); ! if (php_memc_handle_error(status TSRMLS_CC) < 0) { RETURN_FALSE; } *************** *** 365,376 **** * ourselves. */ if (status == MEMCACHED_NOTFOUND && fci.size != 0) { ! status = php_memc_do_cache_callback(getThis(), &fci, &fcc, key, key_len, ! return_value TSRMLS_DC); ZVAL_DOUBLE(cas_token, 0); } ! if (php_memc_handle_error(status) < 0) { memcached_result_free(&result); RETURN_FALSE; } --- 365,375 ---- * ourselves. */ if (status == MEMCACHED_NOTFOUND && fci.size != 0) { ! status = php_memc_do_cache_callback(getThis(), &fci, &fcc, key, key_len,return_value TSRMLS_CC); ZVAL_DOUBLE(cas_token, 0); } ! if (php_memc_handle_error(status TSRMLS_CC) < 0) { memcached_result_free(&result); RETURN_FALSE; } *************** *** 423,430 **** * the value. The callback will take care of storing the value back into memcache. */ if (payload == NULL && status == MEMCACHED_NOTFOUND && fci.size != 0) { ! status = php_memc_do_cache_callback(getThis(), &fci, &fcc, key, key_len, ! return_value TSRMLS_DC); } (void)memcached_fetch(i_obj->memc, NULL, NULL, &dummy_length, &dummy_flags, &dummy_status); --- 422,428 ---- * the value. The callback will take care of storing the value back into memcache. */ if (payload == NULL && status == MEMCACHED_NOTFOUND && fci.size != 0) { ! status = php_memc_do_cache_callback(getThis(), &fci, &fcc, key, key_len,return_value TSRMLS_CC); } (void)memcached_fetch(i_obj->memc, NULL, NULL, &dummy_length, &dummy_flags, &dummy_status); *************** *** 553,559 **** efree(mkeys); efree(mkeys_len); ! if (php_memc_handle_error(status) < 0) { RETURN_FALSE; } --- 551,557 ---- efree(mkeys); efree(mkeys_len); ! if (php_memc_handle_error(status TSRMLS_CC) < 0) { RETURN_FALSE; } *************** *** 594,600 **** memcached_result_free(&result); ! if (status != MEMCACHED_END && php_memc_handle_error(status) < 0) { zval_dtor(return_value); RETURN_FALSE; } --- 592,598 ---- memcached_result_free(&result); ! if (status != MEMCACHED_END && php_memc_handle_error(status TSRMLS_CC) < 0) { zval_dtor(return_value); RETURN_FALSE; } *************** *** 702,708 **** efree(mkeys); efree(mkeys_len); ! if (php_memc_handle_error(status) < 0) { RETURN_FALSE; } --- 700,706 ---- efree(mkeys); efree(mkeys_len); ! if (php_memc_handle_error(status TSRMLS_CC) < 0) { RETURN_FALSE; } *************** *** 726,732 **** if (status == MEMCACHED_END) { status = MEMCACHED_SUCCESS; } ! if (php_memc_handle_error(status) < 0) { RETURN_FALSE; } } --- 724,730 ---- if (status == MEMCACHED_END) { status = MEMCACHED_SUCCESS; } ! if (php_memc_handle_error(status TSRMLS_CC) < 0) { RETURN_FALSE; } } *************** *** 841,847 **** memcached_result_free(&result); ! if (status != MEMCACHED_END && php_memc_handle_error(status) < 0) { zval_dtor(return_value); RETURN_FALSE; } --- 839,845 ---- memcached_result_free(&result); ! if (status != MEMCACHED_END && php_memc_handle_error(status TSRMLS_CC) < 0) { zval_dtor(return_value); RETURN_FALSE; }