Commit Graph

218 Commits

Author SHA1 Message Date
Moriyoshi Koizumi
4859431fc1 Fixed bug #24766 (strange result array from unpack()) 2003-10-03 22:41:43 +00:00
Marcus Boerger
87045df4ce Add missing check 2003-09-18 10:21:38 +00:00
Marcus Boerger
95649ab260 Tests show updating consts must happen once at runtime (revert optimization).
Add tests for static properties.
2003-09-04 16:00:01 +00:00
Marcus Boerger
7bbbd5035d Fix handling of static properties initialized to arrays 2003-09-03 18:01:22 +00:00
Marcus Boerger
1b39a5aa2c Fix static properties.
#
# There's only an errormessage missing which i'll wommit as soon as i find out
# how to do it best. But besides that damn message everything works now and all
# inheritance rules apply.
#
2003-09-03 16:13:40 +00:00
Marcus Boerger
e569b5aee5 Allow redeclaring of protected properties as public (for internal classes).
# See http://news.php.net/article.php?group=php.zend-engine.cvs&article=1737
# for the part not fixed (e.g. property redeclaration of userland classes)
2003-09-02 20:49:42 +00:00
Marcus Boerger
0f3374615b Currently we cannot support static ctor/dtor 2003-09-02 13:26:25 +00:00
Marcus Boerger
047a574e6c - Add zend_merge_properties() which is designed to serve *_fetch_object().
- Explain drawbacks of object_and_properties_init and zend_merge_properties.
#
# I guess we can live with the purity problem of potentially calling __set()
# of an object which wasn't already ctored.
#
2003-08-29 23:27:22 +00:00
Marcus Boerger
f9cebab0cb Add missing check 2003-08-24 22:45:59 +00:00
Marcus Boerger
9603e44eb6 Fix memory source of string duplication for non internal properties 2003-08-24 18:47:11 +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
Zeev Suraski
ea36fc4143 Use ""'s if you want empty strings. We want to crash on errors. 2003-08-24 16:27:01 +00:00
Marcus Boerger
b84e9db3b8 Allow NULL, too 2003-08-24 16:13:23 +00:00
Marcus Boerger
3605be8a29 Fix fn_flags handling 2003-08-24 11:07:30 +00:00
Marcus Boerger
38805f2809 Add property read code and use that in default exception class 2003-08-24 00:36:53 +00:00
Marcus Boerger
baaa4c903d Internal classes can now have default properties. 2003-08-23 19:37:39 +00:00
Marcus Boerger
fbda310a41 - Flag ctor/dtor methods
- Use this to prevent memleaks when an exception gets thrown in ctors.
# I added the dtor flags for consistency, atm a compareable check in
# isn't necessary for destruction. But anyway i'll use this for the
# Relection API too.
2003-08-23 15:38:58 +00:00
Marcus Boerger
fda38bf2ff If ce not given than any object would do 2003-08-21 15:24:33 +00:00
Marcus Boerger
80b3498839 Paramspec 'O' / zend_parse_method_params(): only if given check the class type 2003-08-21 14:39:17 +00:00
Zeev Suraski
0dba58c373 Improve tracking 2003-08-18 21:17:26 +00:00
Marcus Boerger
82050ae8bc - Show class names in error messages when dealing with methods
- Mark class as abstract if it gets an abstract method
2003-08-17 00:57:35 +00:00
Marcus Boerger
fe1a086d19 Simplify abstract method declaration 2003-08-16 20:46:22 +00:00
Marcus Boerger
e08aedf5ff - Show classes in case of methods
- Using sprintf here was a bad idea
2003-08-13 07:02:44 +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
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
Marcus Boerger
4f1e331c4d Initialize all struct members: Necessary for reflection 2003-08-02 19:03:14 +00:00
Wez Furlong
0b6f7bddf4 fix usage of instanceof here too 2003-08-02 11:43:55 +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
Zeev Suraski
4f6b315211 Use instanceof_function() 2003-07-31 16:30:15 +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
Andi Gutmans
af1254e458 - WS 2003-07-12 14:54:53 +00:00
Andi Gutmans
939ab68637 - Add support for Z in zend_parse_parameters(). It will allow the extension
- to retreive the zval **, thus allowing it to use the convert_to_*_ex()
- family of functions to do type conversions without effecting the value in
- the engine itself. (Josh Fuhs <fuhs@purdue.edu>)
2003-07-11 10:21:39 +00:00
Zeev Suraski
134338522f Rework zend_do_declare_property and related code into one code base 2003-07-07 16:22:56 +00:00
Zeev Suraski
376c7a1771 Fix bug 2003-07-07 16:04:42 +00:00
George Schlossnagle
daf3ac65ea add convenience functions or adding class properties. Ok'd for commit by Andi. 2003-07-06 19:55:20 +00:00
Stanislav Malyshev
5a7b07701b Fix bug #19859 - allow fast_call_user_function to support __call 2003-07-03 09:18:41 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Stanislav Malyshev
565985acfc Support 'self' and 'parent' in call_user_func() 2003-06-09 10:55:37 +00:00
Stanislav Malyshev
039c174337 rm namespace leftovers 2003-06-04 08:16:55 +00:00
Stanislav Malyshev
f7f5a5ea6b MEGA-patch: namespaces are R.I.P. 2003-06-02 12:13:11 +00:00
Marcus Boerger
66b9125968 Make use optimized string lowering 2003-05-21 22:57:51 +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
d141ffd9de use zend_str_tolower_copy() 2003-05-21 12:15:33 +00:00
Marcus Boerger
bd74e75b41 Fix namespace issue: Only CG is needed here 2003-05-04 23:01:39 +00:00
Marcus Boerger
29a3586f7b Allow functions in internal namespaces (for example factories) 2003-05-04 22:49:31 +00:00