Dmitry Stogov
592c8a0426
Improved conditions order
2014-06-11 02:46:50 +04:00
Xinchen Hui
d461afc3a2
Merge branch 'PHP-5.6'
2014-06-10 21:58:31 +08:00
Xinchen Hui
ebe6854dbc
Merge branch 'PHP-5.5' into PHP-5.6
...
Conflicts:
Zend/zend_execute_API.c
2014-06-10 21:58:16 +08:00
Xinchen Hui
e8699d75da
Remove unused included file
2014-06-10 21:56:30 +08:00
Xinchen Hui
3c69140a90
Remove unused codes
2014-06-10 21:53:46 +08:00
Dmitry Stogov
eb9b0baaa9
Optimized for fast path
2014-06-10 01:58:28 +04:00
Dmitry Stogov
9a9bb8877e
Improved ZTS support
2014-06-09 21:29:20 +04:00
Dmitry Stogov
371345bed6
Avoid reallocation
2014-06-09 17:36:37 +04:00
Dmitry Stogov
2d29f2d8d9
Comparison optimization
2014-06-09 17:00:22 +04:00
Dmitry Stogov
7bf4fa69be
Avoid extra function call on hot path
2014-06-09 15:41:29 +04:00
Stanislav Malyshev
9fceb05fcf
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Bug 64744 Show the type of the non-object for more descriptive errors
2014-06-08 19:18:09 -07:00
Boro Sitnikovski
cfccdc6362
Bug 64744
...
Show the type of the non-object for more descriptive errors
2014-06-08 19:14:58 -07:00
Stanislav Malyshev
a17734fb04
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix bug 666222
Fix bug 666222
2014-06-08 19:02:51 -07:00
Stanislav Malyshev
8f527fbf14
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Fix bug 666222
Fix bug 666222
2014-06-08 19:02:24 -07:00
Levi Morrison
f47976dd9b
Fix bug 666222
...
This also adds some smaller, isolated tests related to bug 66622.
2014-06-08 18:59:44 -07:00
Levi Morrison
e030efa4f6
Fix bug 666222
...
This also adds some smaller, isolated tests related to bug 66622.
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
2014-06-08 18:59:23 -07:00
Stanislav Malyshev
19edbc9720
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Fixed identation on file
Fix align indentation
2014-06-08 15:54:32 -07:00
Stanislav Malyshev
38343856e1
Merge branch 'PHp-5.4' into PHP-5.5
...
* PHp-5.4:
Fixed identation on file
Fix align indentation
2014-06-08 15:53:26 -07:00
Stanislav Malyshev
224f369a03
Merge remote-tracking branch 'github/pr/671'
...
* github/pr/671:
Fix align indentation
Fixed identation on file
2014-06-08 14:29:03 -07:00
Jefersson Nathan
e51eaaf665
Fix align indentation
2014-06-08 14:28:51 -07:00
Nikita Popov
2adda06544
Merge branch 'PHP-5.6'
2014-06-06 17:13:08 +02:00
Nikita Popov
6d1885342c
Fix bug #67392 : dtrace breaks argument unpack
2014-06-06 17:09:49 +02:00
Dmitry Stogov
e499c3d259
Introduced new BIND_GLOBAL instraction instead of FETCH_W+ASSIGN_REF pair that caused a lot of useles checks
2014-06-06 15:04:30 +04:00
Dmitry Stogov
e4581fd6b8
GC doesn't count scalars and immutable arrays in the same way
2014-06-05 21:05:07 +04:00
Dmitry Stogov
1b8916886b
Speedup string equality check
2014-06-05 19:14:47 +04:00
Dmitry Stogov
730beec16e
Simplify code
2014-06-05 18:42:17 +04:00
Dmitry Stogov
c1965f58d4
Use reference counting instead of zval duplication
2014-06-05 16:04:11 +04:00
Dmitry Stogov
3d87391cc0
Reference counters in PHPNG may have different values
2014-06-04 09:57:17 +04:00
Dmitry Stogov
6e7338700e
Avoid useless merge
2014-06-04 02:11:26 +04:00
Dmitry Stogov
3f6f0d5a70
Simplified and optimized ZEND_HANDLE_NUMERIC()
2014-06-03 13:10:42 +04:00
Dmitry Stogov
bc2ba841f9
Optimized conditions order
2014-06-03 09:45:09 +04:00
Dmitry Stogov
30c05577f7
Optimized conditions order
2014-06-03 03:54:03 +04:00
Dmitry Stogov
af78ea1d97
Avoid copying of immutable arrays
2014-06-03 02:43:53 +04:00
Dmitry Stogov
2bc1abe204
cleanup
2014-06-03 02:43:31 +04:00
Dmitry Stogov
0427ae08fb
cleanup
2014-06-03 00:36:31 +04:00
Dmitry Stogov
032bdbba73
Improved conditions order
2014-05-30 14:40:19 +04:00
Dmitry Stogov
d2020cd91b
Merge branch 'phpng' of git.php.net:php-src into phpng
...
* 'phpng' of git.php.net:php-src:
typo
Revert "Fix ArrayObject with immutable array"
Fix ArrayObject with immutable array
2014-05-30 11:13:19 +04:00
Dmitry Stogov
984c8f87d2
Avoid useless duplication of immutable arrays
2014-05-30 11:12:24 +04:00
Xinchen Hui
9f70b2f6fa
typo
2014-05-30 14:56:50 +08:00
Dmitry Stogov
b3b616cf7e
Introduced immutable arrays. They don't need to be copyed and may be used directly from SHM.
2014-05-29 18:21:56 +04:00
Nikita Popov
47e85b1b35
Improve class constant fetch fix
...
Dereference the cached constant for Test::TEST as well (and not just
self::TEST).
Also improve the phpt file to test this case as well - previously
this only manifested with opcache enabled, due to literal sharing.
Additionally the Z_TYPE_P != IS_REFERENCE assertion is now moved
into the TMP_VAR fetching code (as it applies to more than just
property assignments.)
2014-05-29 11:17:33 +02:00
Nikita Popov
d9a35c7e97
Fix class constant fetching
...
If a class is extended after the constant fetch has been cached
the cached value will be turned into a reference. On the next
fetch the polymorphic cache will return this reference, which
will be directly returned. The object assignment code then
dereferences this result and performs a shallow copy, which is
invalid for references. This subsequently leads to the constant
value being prematurely freed.
This is fixed by dereferencing the value returned from the
polymorphic cache. Furthermore the incorrect dereference from
in the object assignment code is replaced with an assertion that
we're dealing with a non-reference, so ensure that this kind of
problem cannot go unnoticed in the future.
2014-05-29 00:15:50 +02:00
Nikita Popov
411a8757ad
Initialize GC_TYPE_INFO for EG(symbol_table)
2014-05-29 00:15:50 +02:00
Dmitry Stogov
d0d62d3bb0
Use new zend_hash API
2014-05-28 18:45:01 +04:00
Xinchen Hui
1966116791
retval's initializing is already taken by zend_call_function
2014-05-27 17:48:34 +08:00
Dmitry Stogov
e34a6e9211
Use new zend_hash API
2014-05-27 00:38:58 +04:00
Dmitry Stogov
05d0df4706
Use new zend_hash API
2014-05-26 21:29:35 +04:00
Nikita Popov
4ee14c6f8d
Fix ** operator with references
2014-05-26 18:17:55 +02:00
Nikita Popov
ff72c7bfd7
Add test for previous commit
2014-05-26 18:13:16 +02:00
Nikita Popov
ec7b5e0b19
Fix incdec of ref object properties
...
This fixes a number of infinite loops in the Symfony testsuite. It
took an obscene amount of time to track this down :/
2014-05-26 18:00:15 +02:00
Dmitry Stogov
40256e0f9c
Use specialized functions instead of macros
2014-05-26 17:16:16 +04:00
Dmitry Stogov
22f6cf91d5
Optimize func_get_args() to build packed array
2014-05-26 17:15:52 +04:00
Xinchen Hui
b5f90e5103
Save some unnecessary zval copying
2014-05-26 17:25:57 +08:00
Xinchen Hui
bd4b9837e9
Improve call_user_function performance
...
params are all zval * now, and retval will be initialized in
zend_call_function.
maybe we can make call_user_function as a macro proxy to
call_user_function_ex later.
2014-05-26 17:16:22 +08:00
Dmitry Stogov
b66728aabb
Removed useless initializations
2014-05-26 11:42:58 +04:00
Xinchen Hui
066c1d5451
This seems better
2014-05-26 12:05:21 +08:00
Xinchen Hui
02fde346f8
Save one zval copy
2014-05-26 11:49:43 +08:00
Xinchen Hui
922285ec55
Don't use cast (compiler friendly)
2014-05-26 11:05:04 +08:00
Nikita Popov
0ade00c844
Fix print_flat_hash for objects
2014-05-25 20:07:29 +02:00
Nikita Popov
6714770d83
Fix ZTS build
2014-05-25 18:11:24 +02:00
Xinchen Hui
bc357eaf3f
Fixed apply_func_args_t
2014-05-25 20:04:35 +08:00
Xinchen Hui
0175d994c0
Fixed apply_func_arg_t, and it's better not using cast (compiler friendly)
2014-05-25 19:56:51 +08:00
Xinchen Hui
c2082ece52
Fixed apply_func_t (they should be broken before)
2014-05-25 18:32:35 +08:00
Xinchen Hui
00e69ba164
typo
2014-05-24 21:45:07 +08:00
Xinchen Hui
b87cff66b8
fci->retval is always set
2014-05-24 21:37:15 +08:00
Xinchen Hui
60e01e5d64
Added folder mark and codes style
2014-05-24 21:35:36 +08:00
Xinchen Hui
dc8a53d4ba
Merge branch 'PHP-5.6'
2014-05-24 21:11:26 +08:00
Xinchen Hui
666197b8cc
Added folder mark
2014-05-24 21:11:13 +08:00
Dmitry Stogov
9eb89dddb1
Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros.
2014-05-23 20:37:53 +04:00
Nikita Popov
c838f6c5b9
Remove UB in signed printing macro
...
Signed->unsigned conversion and unsigned negation are well-defined
(unlike signed negation for LONG_MIN.)
2014-05-23 13:15:08 +02:00
Nikita Popov
1d8c499b51
Optimize int to string conversion
...
Probably platform depedentant, but for me snprintf is terribly
slow.
The code for the long printing is taken from the smart string
API.
2014-05-23 13:10:50 +02:00
Nikita Popov
4778586896
Fix typo
2014-05-22 19:00:25 +02:00
Nikita Popov
6f0f8511f2
Assert that EMPTY_SWITCH_DEFAULT_CASE() cannot be reached in debug
2014-05-22 19:00:25 +02:00
Dmitry Stogov
21da8af578
Removed the old hack that was originally developed to support constants in array indeces, and isn't needed anymore after the Bob's patch.
2014-05-19 01:20:56 +04:00
Dmitry Stogov
d07c1941ec
Use new hash iteration API and avoid old zend_hash_update_current_key() hack
2014-05-19 00:50:00 +04:00
Dmitry Stogov
41336194b5
Fixed wrong condition
2014-05-18 13:28:06 +04:00
Pierre Joye
06fe7e1e15
Merge branch 'phpng' of git.php.net:php-src into phpng
...
# By Dmitry Stogov (3) and Xinchen Hui (1)
# Via Xinchen Hui
* 'phpng' of git.php.net:php-src:
Fixed invalid read in ext/pdo/tests/pdo_025.phpt(pgsql)
Fixed persistent WSDL cache
Fixed wrong backtrace (__doRequest is not a static method). The "master" behavior is wrong.
Restored __destructor() behavior
2014-05-16 14:32:46 +02:00
Pierre Joye
c0ae699ca2
hash find returns zval* now
2014-05-16 14:31:20 +02:00
Xinchen Hui
d85e39cf4a
Fixed invalid read in ext/pdo/tests/pdo_025.phpt(pgsql)
2014-05-16 19:11:38 +08:00
Dmitry Stogov
3e131b41b2
Fixed memory leaks
2014-05-15 16:18:19 +04:00
Dmitry Stogov
281663f75d
Removed support for old-style resource destructors (only ext/soap used it)
2014-05-15 10:57:03 +04:00
Dmitry Stogov
c446e57588
ext/soap support for phpng (incomplete - just compilable)
2014-05-15 02:44:47 +04:00
Anatol Belski
f089d63ddd
C89 compat
2014-05-13 14:04:53 +02:00
Dmitry Stogov
88421c6a04
Added comment
2014-05-13 10:22:21 +04:00
Xinchen Hui
075a6ced0a
Save one type checking if the type is already string
2014-05-13 14:05:28 +08:00
Tjerk Meesters
e7b50a8ee9
Convert to unpacked before deleting elements
...
Return FAILURE immediately if a string index removal is attempted.
Moved condition higher up
2014-05-13 11:58:28 +08:00
Nikita Popov
8904f72d7c
Fix spl_directory cast_object, reenable error
2014-05-12 20:44:30 +02:00
Jefersson Nathan
dd2005535c
Fix align indentation
2014-05-12 13:37:47 -03:00
Dmitry Stogov
c6c9d1414c
Removed error message that breaks phar
2014-05-12 14:03:10 +04:00
Dmitry Stogov
f089be8291
Fixed wrong buffer length (added place for terminating zero)
2014-05-12 11:17:12 +04:00
Bob Weinand
5bc4eb714a
Merge branch 'PHP-5.4' into PHP-5.5
2014-05-11 15:15:27 +02:00
Bob Weinand
5bf6a093ad
Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245 )
...
Linux apparently does not like memcpy in overlapping regions...
2014-05-11 15:11:03 +02:00
Xinchen Hui
2402d6cbbc
Refactor MySQLi (incompleted, only compilable now)
2014-05-11 14:53:18 +08:00
Xinchen Hui
88c550a799
Added vstrpprintf strpprintf to avoid duplicate string
...
(the function name maybe improvement)
2014-05-10 00:21:49 +08:00
Nikita Popov
9343f874cd
Fix identical comparison of arrays with references
...
Also commit a test I forgot.
2014-05-09 15:46:43 +02:00
Dmitry Stogov
fa7008bb24
Fixed resource destruction
2014-05-08 02:48:31 +04:00
Dmitry Stogov
0c6a6f0fba
Re-applyed Bob's patch with minor fixes
2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976
Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first).
2014-05-07 03:26:13 +04:00
Nikita Popov
4d8c59f0da
Fix parse_method_params
2014-05-06 21:56:01 +02:00
Nikita Popov
ccc2c8ae16
Fix error message in parse_method_params
2014-05-06 20:32:49 +02:00
Nikita Popov
80f8d20b72
Remove dead code from ZEND_THROW
...
The IS_CONST case always throws an E_ERROR two lines above that,
so no need to handle it further.
2014-05-06 20:02:26 +02:00
Nikita Popov
767b5eea7e
Fix throw by reference
...
Reported by Timm Friebe
2014-05-06 20:01:19 +02:00
Nikita Popov
409e9134ac
Sync zend_is_true with convert_to_boolean (fixes GMP test)
2014-05-06 19:03:48 +02:00
Nikita Popov
6e87a0857d
Fix ZTS build
2014-05-06 19:03:48 +02:00
Bob Weinand
628646ec93
Removed now superfluous #define IS_CONSTANT_ARRAY_EX
2014-05-06 18:16:12 +02:00
Bob Weinand
f3c1881f1d
Re-added fix for bug #66015 and adapted for phpng branch
2014-05-06 14:59:03 +02:00
Hannes Magnusson
0ebf0c02a0
Fix argument, cur_method_ref->class_name is a zend_string
2014-05-05 21:45:33 -07:00
Dmitry Stogov
1fa4dcac87
Added comment with problem description and two soltions
2014-05-06 04:35:29 +04:00
Dmitry Stogov
28a8135331
Restored original EG(scope) behavior when call object methods
2014-05-06 02:04:05 +04:00
Nikita Popov
211d32c814
Initialize CG(one_time_string) in ZTS as well
2014-05-05 22:21:57 +02:00
Dmitry Stogov
cd4b4dfc4d
Merge branch 'master' into refactoring2
...
Conflicts:
Zend/zend_hash.c
ext/date/php_date.c
2014-05-05 13:02:43 +04:00
Dmitry Stogov
83d45d0a04
GC checks during argument release don't make sense
2014-05-05 12:40:16 +04:00
Xinchen Hui
bea30846bb
Refactor Zip (1 test failed)
2014-05-05 10:49:27 +08:00
Nikita Popov
b30c7fe263
Port JSON
2014-05-05 01:00:59 +02:00
Anatol Belski
149568f4da
Merge branch 'PHP-5.6'
...
* PHP-5.6:
fixed ZEND_DEBUG usage
2014-05-05 00:51:40 +02:00
Anatol Belski
0d5121a3c7
fixed ZEND_DEBUG usage
2014-05-05 00:50:51 +02:00
Nikita Popov
42d4adabbd
Fix SXE->string cast for __toString in inheriting class
...
This issue was originally hacked around in zend_make_printable_zval.
I've now moved the overridden __toString() handling into the SXE
cast_object handler, so everything invoking that handler
(zend_make_printable_zval, convert_to_string, zval_get_string,
and various other more obscure usages) see the same behavior.
2014-05-03 11:29:08 +02:00
Nikita Popov
65f488ece3
Add STR_ALLOCA_* API, use in get_method and verify_arg
...
This avoid unnecessary allocations when using dynamic method
dispatch and class typehints.
Probably there are other places where this should be done as well,
those just stood out for my usage.
2014-05-03 10:43:45 +02:00
Xinchen Hui
d8651fbe1c
Make they are in the same style of Z_ISREF
2014-05-03 16:08:58 +08:00
Nikita Popov
46bcaf1b28
Merge branch 'PHP-5.6'
2014-05-02 12:52:44 +02:00
Nikita Popov
69b5ee61d0
Fixed bug #67169 : []= after_array_splice incorrect
...
This fixes a regression I introduced in beta 1.
2014-05-02 12:49:51 +02:00
Nikita Popov
d820ea9f5e
Avoid superflous allocations in convert_to_string
...
Taken from zval_get_string.
2014-05-01 09:08:30 +02:00
Nikita Popov
e0247de147
zend_stack_top() now returns pointer directly
2014-05-01 09:08:30 +02:00
Nikita Popov
5a03efe279
Don't allocate zend_stack elements individually
...
Instead allocate a vector of elements. Size must now be specified
on initialization rather than on push.
2014-05-01 09:08:29 +02:00
Nikita Popov
2c24cdb4a3
Comment out cast_object for IS_NULL
2014-05-01 00:25:23 +02:00
Dmitry Stogov
52e79186b2
JMPZ/JMPNZ/JMPZNZ optimization
2014-05-01 01:24:38 +04:00
Dmitry Stogov
17d027ed47
Split IS_BOOL into IS_FALSE and IS_TRUE
2014-04-30 18:32:42 +04:00
Dmitry Stogov
6a911e833f
Optimized JMPZNZ to avoid multiplication at runtime (may be it makes sense to use relative addresses everywere it'll lead to Position Independent Code)
2014-04-30 11:23:19 +04:00
Dmitry Stogov
8a8df2ce68
Changed order of types
2014-04-29 10:54:59 +04:00
Nikita Popov
4cd97b3ebd
Fix by-reference argument unpacking
2014-04-26 10:40:12 +02:00
Nikita Popov
5db9312ec8
Add dst parameter to convert_object_to_type macro
...
Avoids a ZVAL_DUP in the zval_get_* functions.
Also improve object-to-array cast a bit by initializing the array
with correct number of elements and not doing a alloc-init-free
cycle when convert_object_to_type succeeds.
2014-04-25 23:21:05 +02:00
Nikita Popov
778946b3b6
Use convert_scalar_to_array only for arrays
2014-04-25 23:21:05 +02:00
Nikita Popov
4c16b777fe
Uhm, do we really need to support that?
2014-04-25 23:21:05 +02:00
Nikita Popov
9263d18bd9
Optimize ZEND_CAST to avoid zval copies
...
The scalar type casts IS_NULL, IS_BOOL, IS_LONG, IS_DOUBLE and
IS_STRING will no longer require a copy when casting.
A copy is now only made when casting to IS_ARRAY and IS_OBJECT, if
the type doesn't already match.
I tweaked the reference handling for the type-already-correct case
to DEREF the zval after that check. References require a copy anyway,
so they can go through the slow codepath.
2014-04-25 23:21:05 +02:00
Nikita Popov
dd419d24ca
Replace more convert_to_* calls
2014-04-25 23:21:05 +02:00
Nikita Popov
93f9518a58
Align zval_get_long/double with zval_get_string
2014-04-25 23:21:04 +02:00
Dmitry Stogov
f9927a6c97
Merge mainstream 'master' branch into refactoring
...
During merge I had to revert:
Nikita's patch for php_splice() (it probably needs to be applyed again)
Bob Weinand's patches related to constant expression handling (we need to review them carefully)
I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)
Conflicts:
Zend/zend.h
Zend/zend_API.c
Zend/zend_ast.c
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_constants.c
Zend/zend_exceptions.c
Zend/zend_execute.c
Zend/zend_execute.h
Zend/zend_execute_API.c
Zend/zend_hash.c
Zend/zend_highlight.c
Zend/zend_language_parser.y
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
Zend/zend_variables.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/date/php_date.c
ext/dom/documenttype.c
ext/hash/hash.c
ext/iconv/iconv.c
ext/mbstring/tests/zend_multibyte-10.phpt
ext/mbstring/tests/zend_multibyte-11.phpt
ext/mbstring/tests/zend_multibyte-12.phpt
ext/mysql/php_mysql.c
ext/mysqli/mysqli.c
ext/mysqlnd/mysqlnd_reverse_api.c
ext/mysqlnd/php_mysqlnd.c
ext/opcache/ZendAccelerator.c
ext/opcache/zend_accelerator_util_funcs.c
ext/opcache/zend_persist.c
ext/opcache/zend_persist_calc.c
ext/pcre/php_pcre.c
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/pdo_pgsql/pgsql_driver.c
ext/pgsql/pgsql.c
ext/reflection/php_reflection.c
ext/session/session.c
ext/spl/spl_array.c
ext/spl/spl_observer.c
ext/standard/array.c
ext/standard/basic_functions.c
ext/standard/html.c
ext/standard/mail.c
ext/standard/php_array.h
ext/standard/proc_open.c
ext/standard/streamsfuncs.c
ext/standard/user_filters.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
main/php_variables.c
sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg_bp.c
sapi/phpdbg/phpdbg_frame.c
sapi/phpdbg/phpdbg_help.c
sapi/phpdbg/phpdbg_list.c
sapi/phpdbg/phpdbg_print.c
sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
4e7cbf3f58
Use appropriate macros
2014-04-25 11:54:10 +04:00
Dmitry Stogov
42a33085c8
Avoid useless allocations
2014-04-25 11:29:18 +04:00
Dmitry Stogov
df7ca608ce
Optimized constant lookup
2014-04-25 00:56:15 +04:00
Dmitry Stogov
b1ff152782
Reimplement strtr()
2014-04-24 19:14:29 +04:00
Dmitry Stogov
65e2ed6e50
Redesigned zend_execute_data layout now EX(object), EX(scope) and EX(called_scope) arr properties of the current function execution co
...
ntext. They are set during zend_execute_data initialization and never changed.
2014-04-24 15:53:20 +04:00
Nikita Popov
c98d373eb6
Fix strict array comparison
...
Fixes Symfony test failures
2014-04-23 20:34:45 +02:00
Nikita Popov
08ae88157b
Allocate zend_strings with correct size
...
For me (32bit) sizeof(zend_string) is 20, which means that the
char[1] array at the end is padded with three bytes. Thus allocating
based on sizeof(zend_string)-1 overallocates by those 3 padding bytes.
This commit fixes the allocation size, by using XtOffsetOf.
2014-04-23 19:34:51 +02:00
Dmitry Stogov
7e424f5a95
Use symbolic names instead of magic constants + optimization
2014-04-23 02:47:41 +04:00
Nikita Popov
9c70603f4a
Initialize hash as unpacked if it contains string keys
2014-04-22 21:33:49 +02:00
Nikita Popov
4912bec514
Fix zts
2014-04-22 19:39:13 +02:00
Nikita Popov
3d3a55cbcb
Pass expected array size hint in INIT_ARRAY
...
To avoid unnecessary rehashes
2014-04-22 18:57:03 +02:00
Dmitry Stogov
7584ae3200
Fixed compilaation warnings
2014-04-22 18:52:59 +04:00
Dmitry Stogov
5864ce8a44
Fixed compilation warnings
2014-04-22 17:46:34 +04:00