Commit Graph

73 Commits

Author SHA1 Message Date
Zeev Suraski
8ce8324e59 More TSRMLS_FETCH annihilation 2001-07-30 04:54:16 +00:00
Zeev Suraski
660a09c6da Fix compile warning 2001-07-21 14:18:53 +00:00
Andi Gutmans
6bd084cb0a - Remove unused code 2001-07-17 16:10:15 +00:00
Zeev Suraski
563aacdb66 Fix bug #6239 2001-07-15 18:57:43 +00:00
Zeev Suraski
f63367bf16 layout 2001-07-13 12:08:32 +00:00
Thies C. Arntzen
7b7e72d1d2 the resource-lists are now destroyed backwards. this will make sure that
resources get destroyed in the opposite order they were created and thereby
db-cursors will always be released before their corresponding connection etc.
this sould not break anything!
2001-07-13 12:05:47 +00:00
Andi Gutmans
b98acd61f1 - Move inline_zend_hash_func() to header file 2001-07-11 16:16:08 +00:00
Andi Gutmans
2f8fa8cf21 - Merge faster hash implementation.
- The hash function parameter in hash_init(...) is not used anymore.
- It should be removed but it is "to be decided" if we want to do that now
- or in a major version as it means changing MANY places and third party
- modules might stop working.
2001-07-10 20:31:42 +00:00
Sascha Schumann
ba8af2515e Fix segfault when using zend_hash_add_empty_element 2001-05-19 14:53:55 +00:00
Zeev Suraski
755207a1e6 Implement zend_hash_add_empty_element() using the existing infrastructure 2001-05-16 17:22:01 +00:00
Sascha Schumann
bb472e7069 Initialize empty pDataPtr to a pseudo value to prevent a pefree on
pData.
2001-05-14 10:49:17 +00:00
Sascha Schumann
3efa08aaa8 Some extensions don't associate any data with hash entries,
except the key.  Prior to this change, a separate chunk of memory
was allocated in that case to store exactly zero bytes (plus
memory manager overhead).  We treat that case similar to the
pointer case, but don't copy any data at all (because the pointer
is usually the NULL pointer).
2001-05-11 19:32:01 +00:00
Zeev Suraski
4e71bbed0a include limits.h if available 2001-04-28 20:21:42 +00:00
Andi Gutmans
acd56b0891 - More whitespace fixes while I'm at it. 2001-04-27 18:53:25 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Zeev Suraski
36eaad252f Allow get_current_key() not to return the key itself, instead of a duplicate 2000-12-22 12:49:51 +00:00
Zeev Suraski
0fcce4a77a @* Fixed a possible crash in get_class_methods() (Zeev) 2000-12-22 12:08:04 +00:00
Sascha Schumann
fb87cc8c8e INIT_DATA/UPDATE_DATA assumed that pData elements of the size of a void
pointer would actually be aligned like a void pointer. This lead
to bus errors on architectures which don't allow unaligned 32-bit accesses.
2000-12-06 21:24:10 +00:00
Andi Gutmans
e9887156cf Don't use 'new' symbol 2000-10-11 19:11:48 +00:00
Zeev Suraski
9aa38aad45 Add zend_hash_merge_ex(), for selective merging 2000-10-11 16:22:40 +00:00
Andi Gutmans
c4fd954b8a - Another has optimization/fix like the hash_copy one from earlier on 2000-09-28 23:21:08 +00:00
Stanislav Malyshev
56c474cf48 Make hash_copy call copy constructor on a real copy, not on a temp 2000-09-28 15:17:50 +00:00
Zeev Suraski
a650dd8a19 This is probably the oldest bug in PHP :)
Luckily it's unlikely we're ever actually bitten by this bug.
2000-07-18 20:08:06 +00:00
Zeev Suraski
1263932a0d Disable the hash_apply() protection on hashes that persist across requests - it's unsafe
because we may be aborted at any point
2000-07-11 14:27:31 +00:00
Zeev Suraski
38cdb8e7b7 Avoid crashing with recursive applies - limit apply nest level to 3 (I'm not aware of a place
in which applying recursively on the same hash makes sense with more than one nest level, but
3 should be enough)
2000-06-17 14:11:57 +00:00
Zeev Suraski
bfac4633a5 - Support unordered hash comparisons
- Make == perform an unordered comparison with arrays/objects, and === perform an ordered comparison
2000-06-04 21:59:49 +00:00
Zeev Suraski
dae76aa1b5 Support comparisons of arrays (with arrays) and objects (with objects) 2000-06-03 10:34:19 +00:00
Zeev Suraski
0b7a9cea88 - Fix Win32 compilation (Use winsock2.h from now on)
- Add lambda() support
2000-06-03 01:49:49 +00:00
Zeev Suraski
8ca13c97c2 Change zend_hash_get_current_key_ex() to also return the string length 2000-05-02 17:52:31 +00:00
Andi Gutmans
6db18997bb - Nuke hash_*_ptr functions 2000-03-24 11:12:30 +00:00
Andrei Zmievski
ee286febe7 Make zend_hash_move_forward()/zenv_hash_move_backwards() a little smarter. 2000-03-15 16:25:59 +00:00
Andrei Zmievski
a32c54bdbb Introduced a way to traverse hashes through external pointers. 2000-03-13 15:25:18 +00:00
Zeev Suraski
5e55e47f7f It's official now... 2000-03-06 05:26:39 +00:00
Zeev Suraski
0ac9536d99 (c) patch 2000-02-19 22:46:42 +00:00
Zeev Suraski
ceba50b6ed - Fix a nasty bug in the hash, introduced in the recent migration to macros
- Make array_init() and friends trackable
2000-02-19 19:21:45 +00:00
Andi Gutmans
e578fad099 - Save a function call one very hash_add 2000-02-13 13:31:29 +00:00
Andi Gutmans
bb302a755c - Make startup a bit faster by changing some hash_update()'s and hash_add()'s
to hash_update_ptr()/hash_add_ptr()
2000-02-13 13:22:02 +00:00
Andi Gutmans
920b7b2841 - Fix a couple of potential bugs where we were using emalloc/efree instead
of pemalloc/pefree.
- Fix a bug were we potentially would be freeing the key by mistake
2000-02-13 12:45:36 +00:00
Andrei Zmievski
94be61fde5 Made a couple of typedefs for zend_hash_apply_*() calls. 2000-02-11 21:12:49 +00:00
Zeev Suraski
9f51f154aa - Stop passing list/plist to internal functions
- Add a typedef for the pCopyConstructor function pointer
- Minor hacks
2000-02-05 15:11:24 +00:00
Thies C. Arntzen
d6afe4bac7 took out zend_hash_pointer_update() & zend_hash_pointer_index_update_or_next_insert() - i really prefer link-errors instead of runtime-errors, don't you? 2000-02-01 10:40:05 +00:00
Zeev Suraski
c3677ca907 Add some order... 2000-01-20 14:26:31 +00:00
Zeev Suraski
92633067af Indentation fixes 2000-01-20 05:27:57 +00:00
Andi Gutmans
af2ef0830a - Optimize zend_hash_del a tiny bit. 2000-01-19 19:47:16 +00:00
Andi Gutmans
aa73f6b68f - Hopefully fix the hash problem. 2000-01-19 19:44:32 +00:00
Andi Gutmans
7271c050a3 - Hrm I'm not concentrating 2000-01-19 18:14:20 +00:00
Andi Gutmans
99783fe795 - Actually the destructor should run after the data is already detached
from the hash but before the bucket is freed.
2000-01-19 18:12:05 +00:00
Andi Gutmans
d3690efffe - Rollback hash_apply and friends. They assume now that hash_del is reentrant
as it first applies the destructor and only later nukes the bucket
2000-01-19 18:05:16 +00:00
Andi Gutmans
b7b97df93f - Run destructor before the hash structure is modified, thus, making
hash_del, reentrant (BLOCK_INTERRUPTIONS needs to be made a counter now).
2000-01-19 17:39:55 +00:00
Andi Gutmans
58fb1a3922 - Undo a bug we introduced. (Another one out there). 2000-01-19 17:31:33 +00:00