Commit Graph

248 Commits

Author SHA1 Message Date
Marcus Boerger
03e039b19d Fix __autoload() with derived classes 2003-12-29 12:35:44 +00:00
Marcus Boerger
c6cb00fe59 Fixed bug #26697 (calling class_exists on a nonexistent class in __autoload
results in segfault).
2003-12-23 10:45:10 +00:00
Dmitry Stogov
ae4a09b239 *** empty log message *** 2003-12-17 15:08:13 +00:00
Dmitry Stogov
20f73cd267 Access to globals/autoglobals from class __destructor was fixed.
(see "tests/lang/bug24908.phpt" and "tests/classes/destructor_and_globals.phpt")
2003-12-17 14:25:12 +00:00
Dmitry Stogov
2d9281352b Memory corruptions were fixed in zend_str_tolower_copy() 2003-12-15 07:17:27 +00:00
Marcus Boerger
39544e1c7f Bugfix: #26591 [NEW]: "__autoload threw an exception" during an uncaught
Exception
2003-12-11 18:18:52 +00:00
Marcus Boerger
310d6c567a Do not double copy the string 2003-12-10 10:24:35 +00:00
Andi Gutmans
d344648b07 - Fix __autoload() to preserve class case.
- Heads up, this patch might break stuff so please let me know if you
- bump into any problems.
2003-11-24 18:13:29 +00:00
Marcus Boerger
f3d385a587 Make __autoload() faster 2003-11-07 11:47:50 +00:00
Marcus Boerger
b28db6a2d3 Revert accidental commit 2003-10-24 18:42:00 +00:00
Marcus Boerger
071eaf8576 Zend/ZEND_CHANGES 2003-10-24 18:24:28 +00:00
Stanislav Malyshev
6a71c1d33f The freed one is a hashtable - may matter if Hashtables are allocated
differently
2003-10-14 14:36:23 +00:00
Stanislav Malyshev
b163778fee ws 2003-09-11 17:06:53 +00:00
Stanislav Malyshev
406ff728f1 Use scope from method, not from object 2003-09-11 17:04:26 +00:00
Marcus Boerger
1257b407a6 WS 2003-09-01 13:04:55 +00:00
Marcus Boerger
19ec7a09fc - Provide appropriate way to destroy internal zval's.
- Allow internal zval's of type string and disallow complex types.
- Define the default string for extensions at class level instead of ctor.
2003-08-24 17:32:47 +00:00
Marcus Boerger
d3473d1f58 - Provide a unified way to display uncaught exceptions, which shows
file/line/message info if possible.
- Add zend_eval_string_ex() to be able to handle exceptions in eval'd code.
- Use above function to fix memleaks in CLI.
2003-08-24 13:10:03 +00:00
Zeev Suraski
5b312b571e Clarify use of original_function_state_ptr 2003-08-07 07:37:19 +00:00
Marcus Boerger
e9a4c91ca4 - Fix warnings
- Fix code
2003-08-07 07:17:34 +00:00
Zeev Suraski
0a83ebfd56 clarify :) 2003-08-06 07:38:56 +00:00
foobar
cc011660e7 Fix the build 2003-08-05 23:50:59 +00:00
Zeev Suraski
92b4013e8d Try to put an end to the endless number of call_user_function variants.
zend_call_function() now takes a structure that should contain all of the
necessary information.  If further information is necessary in the future,
then we'll be able to add it without having to introduce a new function.

As for caching - the 2nd, optional argument is a struct that can hold all
of the information that's necessary to invoke the function, including its
handler, scope and object it operates on (if any).  Note that you may only
use a cache if the arguments you provide to zend_call_function() are
identical to the ones of the last call, except for the argument and return
value information.


The recently introduced fast_call_user_function() was removed

I fixed most of the places that used fast_call_user_function() to use caching
but there are still some that need to be fixed (XML and reflection)
2003-08-05 10:24:40 +00:00
Stanislav Malyshev
f572897dea remove stack clean - it makes trouble 2003-08-05 07:56:49 +00:00
Marcus Boerger
65557ef672 Nuke unused variables 2003-08-04 19:56:12 +00:00
Ilia Alshanetsky
1007b0a826 Fixed bug #23104 (hash position of static arrays not being reset) 2003-08-04 17:10:52 +00:00
Stanislav Malyshev
2884e8a715 oops. forgot function 2003-08-04 11:03:38 +00:00
Stanislav Malyshev
7cb1730293 fix crash #24842 2003-08-04 11:02:53 +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
9d7122fb53 Generalize fetch_class 2003-08-03 08:21:08 +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
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
5a7b07701b Fix bug #19859 - allow fast_call_user_function to support __call 2003-07-03 09:18:41 +00:00
Sterling Hughes
92e9e0ca7e optimize the case where the object is really a class name, as we don't need
to set EX(object) here.
2003-07-02 14:44:41 +00:00
Sterling Hughes
3fc83023b6 Timm Friebe points out that object detection should be done regardless of
the function pointer
2003-07-02 14:33:41 +00:00
Marcus Boerger
bef4696d3e small bugfix 2003-07-01 22:47:41 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
Stanislav Malyshev
fe1ef91e77 No need to duplicate code - zend_get_constant() knows to
handle class constants now
2003-06-15 14:46:15 +00:00
Stanislav Malyshev
95a936becc Fix bug #18872 - Improper handling of class constants used as default
function argument values
2003-06-15 14:42:39 +00:00
Stanislav Malyshev
efafae1427 Fix bug #21800 - initialize opcode handlers in interactive mode 2003-06-15 11:44:30 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Wez Furlong
7959b2d7b0 Fix for Bug #23951 2003-06-09 17:02:32 +00:00
Stanislav Malyshev
565985acfc Support 'self' and 'parent' in call_user_func() 2003-06-09 10:55:37 +00:00
Stanislav Malyshev
f7f5a5ea6b MEGA-patch: namespaces are R.I.P. 2003-06-02 12:13:11 +00:00
Marcus Boerger
7af8eadd57 Make zend_str_tolower_copy() a copy function (like stccpy).
Supply a dup version (like estrdup).
Fix tolower() handling.
# Havin copy and dup allows to use the faster version even with
# memory not allocated by emalloc.
2003-05-21 21:59:40 +00:00
Sterling Hughes
ca6ca5e2a6 optimize the lookups by avoiding a copy and then another pass
Naked Dancing Girls should be given to: Myself, Zeev, Marcus,
and George Schlossnagle (in no particular order)
2003-05-20 18:28:14 +00:00
Sterling Hughes
909eafc2b0 add fast_call_user_function() 2003-05-20 16:44:42 +00:00
Marcus Boerger
fe47a383e3 One function call is enough 2003-05-12 18:54:05 +00:00
Stanislav Malyshev
52ac291c54 Check name before '::' so that it would be a namespace in zend_lookup_ns_class 2003-04-20 14:40:38 +00:00
Andrei Zmievski
3b47a64269 Add zend_lookup_ns_class() function. 2003-04-08 17:10:01 +00:00
Sebastian Bergmann
3fc852824f Eliminate TSRMLS_FETCH() calls in destroy_op_array() and zend_get_class_entry(). 2003-03-26 07:44:11 +00:00