Anatol Belski
9d4001f1c8
fix C89 compat
2014-03-22 10:44:01 +01:00
Nikita Popov
f331ed1414
Revert "Add helper function for updating bucket contents"
...
Reverting this for now, because it would require further changes
thanks to the zend signals tsrms-but-only-sometimes awesomeness.
2014-03-21 01:32:49 +01:00
Nikita Popov
4e7e301dda
Rename+move zend_hash_apply_deleter and reuse it
...
The interruption handling was normalized to wrap the entire deletion
operation (instead of leaving out the destructor call and/or the
deallocation) per the recommendation of somebody (don't remember who)
familiar with zend signals.
There is an always-inlined variant of the function for use in
the main deletion function, to ensure there is no performance
impact.
2014-03-21 00:14:52 +01:00
Nikita Popov
4efa58dd59
Make zend_hash_apply_deleter() void, to allow reuse
...
Also remove lies in the comment above the function. apply_deleter
is not safe against modification, if the modification involves
removing the next bucket.
Also modified the implementation of zend_hash_graceful_destroy()
to be fully graceful (the reverse variant already was).
2014-03-21 00:14:51 +01:00
Nikita Popov
c3a317117a
Add helper function for updating bucket contents
2014-03-21 00:14:46 +01:00
Nikita Popov
994fcfcff9
Remove unnecessary check
...
In case of an update the key already existed, so the next free
element can not change.
2014-03-20 22:58:10 +01:00
Dmitry Stogov
62c448ab8b
Fixed serialize/unserialize problems
2014-03-17 17:23:27 +04:00
Dmitry Stogov
51494f252f
Don't include trailing zero into hash caclculation
2014-03-14 15:35:57 +04:00
Dmitry Stogov
3e4c22b499
Fixed possible HashTable modification in its destructor
2014-03-06 16:53:13 +04:00
Dmitry Stogov
e0f6bae56b
Passing symbol_table into user error handlers
2014-03-04 14:17:17 +04:00
Xinchen Hui
a52659bc25
zend_hash_del didn't check the PACKED flag
2014-02-19 19:27:42 +08:00
Dmitry Stogov
5de7115679
Use better data structures (incomplete; able to run bench.php)
2014-02-18 16:27:38 +04:00
Dmitry Stogov
be82a07776
Use better data structures (incomplete)
2014-02-12 18:08:11 +04:00
Dmitry Stogov
f4cfaf36e2
Use better data structures (incomplete)
2014-02-10 10:04:30 +04:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772
Bump year
2014-01-03 11:06:16 +08:00
Dmitry Stogov
6c2a806820
Avoid interned hash key duplication and hash key length recaclulation
2013-11-29 00:57:49 +04:00
Dmitry Stogov
5d25762646
Removed unused "pHashFunction" argument in _zend_hash_init() and family (must be 99% source compatible)
2013-11-28 18:40:46 +04:00
Dmitry Stogov
b63b81815f
Some rare deprecated cases replaced by ZEND_ASSERT() (some extensions might need to be fixed)
2013-11-28 17:02:01 +04:00
Dmitry Stogov
aa427a10d4
Removed duplicated hash function implementation (100% source compatible)
2013-11-28 17:01:10 +04:00
Stanislav Malyshev
02457554a3
Merge branch 'PHP-5.5'
...
* PHP-5.5:
backward compatibility
HASH_KEY_NON_EXISTANT fix
2013-07-21 20:10:31 -07:00
Veres Lajos
4749457a49
HASH_KEY_NON_EXISTANT fix
2013-07-21 20:09:53 -07:00
Nikita Popov
42729c1baf
Merge branch 'PHP-5.5'
2013-06-17 23:49:08 +02:00
Nikita Popov
86434be946
Fix bug #65051 : count() off by one inside unset()
...
nNumOfElements was incremented after the pDestructor code, so any
code in the dtor would get a wrong number of elements.
Right now the bucket deletion code is replicated in four places,
it should probably be moved off into one function (or rather,
zend_hash_apply_deleter should be used everywhere). The codes are
subtly different though in that the HANDLE_UNBLOCK_INTERRUPTIONS()
happens in different places. In particular it seems odd that in
some cases interruptions stay blocked during the destructor call.
2013-06-17 23:44:13 +02:00
Nikita Popov
ae91084067
Remove unnecessary NULL checks from zend_hash
...
Our memory allocation functions (including the persistent ones)
are infallible, so no need to check for NULL.
2013-06-17 18:51:59 +02:00
Nikita Popov
1f34ccbe34
Fix bug #64555 : foreach no longer copies keys if they are interned
2013-04-03 20:29:19 +02:00
Nikita Popov
fcc6611de9
Add support for non-scalar Iterator keys in foreach
...
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Xinchen Hui
a666285bc2
Happy New Year
2013-01-01 16:37:09 +08:00
Felipe Pena
8775a37559
- Year++
2012-01-01 13:15:04 +00:00
Dmitry Stogov
dc18f8427c
Fixed icorrect key length after updating constant index
2011-12-01 13:58:29 +00:00
Dmitry Stogov
e43ff1359e
Fixed ZE specific compile warnings (Bug #55629 )
2011-09-13 13:29:35 +00:00
Pierre Joye
710d46f38e
- WS
2011-09-06 06:34:36 +00:00
Pierrick Charron
7f203d4385
Fix typo
2011-08-08 11:30:56 +00:00
Rasmus Lerdorf
1ac9192d46
Fix missing va_end() found by Coverity
2011-08-05 22:18:42 +00:00
Dmitry Stogov
8ff0701e8d
Fixed bug #50816 (Using class constants in array definition fails).
2011-08-01 11:21:23 +00:00
Felipe Pena
5ca0f69921
- Fix ZTS build
2011-06-02 22:54:14 +00:00
Ilia Alshanetsky
939875133a
Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals )
...
This needs to go into 5.4 as well, but will wait for Pierre to review win32 situation
# Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire & Ilia Alshanetsky
2011-06-02 21:16:50 +00:00
Dmitry Stogov
50ce16deff
Fixed bug #54268 (Double free when destroy_zend_class fails)
2011-04-15 12:43:20 +00:00
Dmitry Stogov
8fe3ea75cb
Changed initialization order to workaround against crashes after memory overflow
2011-04-15 09:59:42 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Johannes Schlüter
1e1e70dc55
- Don't be silent on bailout
2010-09-14 14:26:37 +00:00
Dmitry Stogov
25d6aee4fb
Removed redundant check
2010-07-07 11:44:27 +00:00
Felipe Pena
e232da026b
- Replaced 'zend_hash_find' to 'zend_hash_quick_find' on zend_hash_compare() function
2010-05-03 16:36:04 +00:00
Dmitry Stogov
dd5c478be6
Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed.
2010-04-20 11:05:54 +00:00
Dmitry Stogov
ea53dc5af6
Added an optimization which saves memory and emalloc/efree calls for empty HashTables
2010-04-20 10:49:22 +00:00
Sebastian Bergmann
d2281d1dff
sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php
2010-01-05 20:46:53 +00:00
Matt Wilmas
dca18b68d1
MFH: Fixed bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
...
Also simplified related array_push() test
2009-06-07 19:28:15 +00:00
Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
2008-12-31 11:15:49 +00:00
Felipe Pena
cf7384aa40
- MFH: Constness (Added const qualifier to several function parameters)
2008-08-12 17:20:25 +00:00
Antony Dovgal
3c018ceb75
fix WS
2008-08-07 11:51:54 +00:00