1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

2710 Commits

Author SHA1 Message Date
Zeev Suraski 1959133fb3 Simplify code using XOR 2003-08-04 07:53:09 +00:00
Zeev Suraski fe9b5870af Add logical XOR, proves to be quite useful lately 2003-08-04 07:52:36 +00:00
Zeev Suraski 6f53e48bb9 This check shouldn't be necessary 2003-08-04 07:52:09 +00:00
f1d8c1c448 ChangeLog update 2003-08-04 00:30:32 +00:00
Marcus Boerger 1f8fd69e78 Fix crash 2003-08-03 22:28:14 +00:00
Marcus Boerger 538aad24e3 Fix test and add missing initialization 2003-08-03 22:03:52 +00:00
Zeev Suraski ef5a79bfed Ensure functions have a valid access level 2003-08-03 21:06:23 +00:00
Zeev Suraski e3f4147931 Default to public 2003-08-03 21:04:39 +00:00
Marcus Boerger 8c614ddda4 Not needed, will be copied from ptr->flags later 2003-08-03 20:49:27 +00:00
Marcus Boerger bdf84d4e12 Add missing arg info 2003-08-03 19:25:03 +00:00
Moriyoshi Koizumi fb6300dd6c Style & WS fixes 2003-08-03 19:20:45 +00:00
Zeev Suraski f8bbafd604 ntroduce infrastructure for supplying information about arguments,
including:

- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance

Both user and builtin functions share the same data structures.

To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:

ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
    ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
    ZEND_ARG_PASS_INFO(0)
    ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();

and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.

The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.

The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
Zeev Suraski 7112d3a3f8 No need for this initialization - this function initializes all of the
elements of zend_internal_function
2003-08-03 10:32:40 +00:00
Zeev Suraski 8b4bd4a8ec Clean up. extended_value can only contain either ZEND_UNSET_DIM or
ZEND_UNSET_OBJ.
2003-08-03 08:23:25 +00:00
Zeev Suraski 9d7122fb53 Generalize fetch_class 2003-08-03 08:21:08 +00:00
973b85672b ChangeLog update 2003-08-03 00:30:27 +00:00
Marcus Boerger 4f1e331c4d Initialize all struct members: Necessary for reflection 2003-08-02 19:03:14 +00:00
Marcus Boerger 04c90c8738 Show interfaces 2003-08-02 14:22:18 +00:00
Wez Furlong 0b6f7bddf4 fix usage of instanceof here too 2003-08-02 11:43:55 +00:00
Marcus Boerger 4fa6eac1f8 Fix warning 2003-08-02 11:39:15 +00:00
be9986eb8e ChangeLog update 2003-08-02 00:30:27 +00:00
Wez Furlong 5c4de2664c better fix... 2003-08-01 17:51:56 +00:00
Wez Furlong ad12b3da82 Fix "O" format for zend_parse_parameters 2003-08-01 16:48:11 +00:00
6e49dd99c8 ChangeLog update 2003-08-01 00:30:42 +00:00
Zeev Suraski 4f6b315211 Use instanceof_function() 2003-07-31 16:30:15 +00:00
Zeev Suraski accd6b623b Finish the array overloading patch 2003-07-31 09:06:11 +00:00
Zeev Suraski d95a6916de Cleanup 2003-07-31 08:24:55 +00:00
Andi Gutmans 7055fda013 - Fix logic. It was the wrong way around. 2003-07-31 05:08:59 +00:00
8d75e7082d ChangeLog update 2003-07-31 00:30:27 +00:00
Andi Gutmans 8264eedc48 - Fix problem with hash when updating same bucket with data of different
sizes one after another.
- Fix number of arguments to read_dimension.
2003-07-30 19:47:39 +00:00
Zeev Suraski 68fa4e50f8 Get rid of an opcode 2003-07-30 17:49:27 +00:00
Zeev Suraski f41f62c2ff Support overloading of $foo["bar"] += "baz" 2003-07-30 17:40:54 +00:00
Zeev Suraski c0b46739ca Improve array overloading - support unset($foo["bar"]) 2003-07-30 17:12:06 +00:00
Zeev Suraski 4839ce5952 Remove garbage 2003-07-30 17:02:41 +00:00
Zeev Suraski 2fd4ffce17 Add exec_finished() callback for modules - this is the last place where the
modules may touch the symbol table reliably
2003-07-30 16:13:52 +00:00
815be4e5c6 ChangeLog update 2003-07-30 00:30:26 +00:00
Ilia Alshanetsky 7b18132dba Test case for bug #22836. 2003-07-29 17:56:50 +00:00
foobar c50fbaf69a Remove the obfuscation caused by the double "#ifdef ZTS" 2003-07-29 01:30:59 +00:00
8aef486417 ChangeLog update 2003-07-28 00:30:27 +00:00
Stanislav Malyshev 57b12285de fix compare 2003-07-27 16:43:05 +00:00
Stanislav Malyshev 7b1bbc85bc use zend_binary_strncasecmp 2003-07-27 16:39:35 +00:00
Stanislav Malyshev 47fef22bc5 change shutdown order so that dtors would coexist with object error handlers 2003-07-27 15:59:37 +00:00
Stanislav Malyshev 1cc89effdb clean the right one 2003-07-27 14:02:46 +00:00
Stanislav Malyshev 5bfd386bc3 make shutdown more granular so in case some dtor goes ape we still
can shut down cleanly
2003-07-27 13:47:58 +00:00
Stanislav Malyshev 9fa2d52310 make clone and throw coexist peacefully 2003-07-27 13:20:31 +00:00
Stanislav Malyshev 6bea4ca1b0 add test 2003-07-27 12:50:56 +00:00
Stanislav Malyshev c3c136ea4b fix #24635: clean hash before putting into cache 2003-07-27 12:46:14 +00:00
Stanislav Malyshev 399db3c846 fix crash #24550 2003-07-27 12:25:50 +00:00
Stanislav Malyshev 91b4bca976 add test 2003-07-27 12:07:23 +00:00
Stanislav Malyshev 5724c7a66c fix leaks with class constants (bug #24699) 2003-07-27 12:03:54 +00:00