|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-14 12:37 UTC] jani@php.net
-Package: Feature/Change Request
+Package: Scripting Engine problem
[2020-03-01 22:41 UTC] cmb@php.net
-Assigned To:
+Assigned To: krakjoe
[2020-03-01 22:41 UTC] cmb@php.net
[2021-08-22 04:48 UTC] krakjoe@php.net
-Status: Assigned
+Status: Closed
[2021-08-22 04:48 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 16:00:01 2025 UTC |
Description: ------------ I was using a TsHashTable in my extension and assumed that it behaves the same as normal HashTable. It is almost the same except function zend_ts_hash_apply_with_arguments. Reproduce code: --------------- function applyFunc(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) { int myint = va_arg(args, int); // myint will contain the wrong integer. Hoever the following code will work // va_list args2 = va_arg(args2, va_list); // int myint = va_arg(args2, int); } zend_ts_hash_apply_with_arguments(ht TSRMLS_CC, applyFunc, 1, myInt); Expected result: ---------------- Expected that there is no need to extract args2 before extracting the actual argument. In other word: Expected to use the same applyFunc for both, TsHashTable and HashTable Actual result: -------------- You need to extract another va_list first before extracting the arguments