Commit Graph

161 Commits

Author SHA1 Message Date
Marcus Boerger
7bbbd5035d Fix handling of static properties initialized to arrays 2003-09-03 18:01:22 +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
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
cec053f707 Don't identify alias'ed functions 2003-08-24 16:35:58 +00:00
Marcus Boerger
eef1b7b1e8 One of PPP is needed, too 2003-08-24 11:24:10 +00:00
Marcus Boerger
1c2512ddea - Add fn_flag ZEND_ACC_ALIAS
- Unify way of function_entry generation by new macro ZEND_FENTRY
2003-08-24 11:09:45 +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
717b5afe1d Fix warnings 2003-08-17 18:56:54 +00:00
Sascha Schumann
c7d9be97ca explicitly cast size_t to zend_uint to avoid warnings on 64 bit platforms. 2003-08-17 13:45:51 +00:00
Marcus Boerger
fe1a086d19 Simplify abstract method declaration 2003-08-16 20:46:22 +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
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
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
George Schlossnagle
0229aad042 reverted at Andi's request. replaced with more generic wrapper. 2003-07-21 06:05:58 +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
George Schlossnagle
daf3ac65ea add convenience functions or adding class properties. Ok'd for commit by Andi. 2003-07-06 19:55:20 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +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
b1b8ed64dc Revert to sizeof() 2003-05-23 18:37:36 +00:00
Sterling Hughes
909eafc2b0 add fast_call_user_function() 2003-05-20 16:44:42 +00:00
Hartmut Holzgraefe
cb71ac03cb C++ compile fixes 2003-05-20 13:21:26 +00:00
Marcus Boerger
29a3586f7b Allow functions in internal namespaces (for example factories) 2003-05-04 22:49:31 +00:00
Stanislav Malyshev
ad01495a48 Change get_class() so that it returns qualified names for namespaced
classes.

*HEADS UP*: get_class_name() handler interface is changed, now it should
allocate the space it returns with emalloc, and the users free it. If
anyone has problems with it or has suggestions how to do it without this -
please tell.

Also: make function_exists() understand namespaces.
2003-04-21 17:01:34 +00:00
Andrei Zmievski
e5f4c783bc Rename zend_register_internal_class_in_ns() to a better, less filling,
but with the same great taste zend_register_internal_ns_class().
2003-04-08 17:40:56 +00:00
Andrei Zmievski
81482833b5 Introduce ZEND_ME() and ZEND_METHOD() macros. Use these for declaring
class methods to avoid name collisions.
2003-04-04 15:38:20 +00:00
Stanislav Malyshev
6ed305945d Fix namespace issues 2003-04-04 12:25:47 +00:00
Andrei Zmievski
3d62a3491e - Add zend_register_internal_namespace() API function.
- Add zend_register_internal_class_in_ns() API function.
2003-04-02 20:27:44 +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
Harald Radi
a700180f5d commiting zend_disable_class patch for George:
disabled classes will be replaced by dummy classes
that print a warning upon instanciation
2003-03-03 01:22:43 +00:00
Ilia Alshanetsky
a2bd043e7b Removed zend_get_module(), this function is not used by anything and more
importantly. it does not work. It tries to find data based on numeric keys
in hash table using string keys.
2003-02-12 16:50:51 +00:00
Georg Richter
325f9edb07 fixed zend_parse_method_param 2003-02-08 20:54:02 +00:00
Sebastian Bergmann
0026239c6a Build fix. 2003-02-03 09:42:53 +00:00
Harald Radi
c4528f82a0 extend the parameter parsing API by two functions
for parsing method parameters with automatic
detection if the function was called as such or as
a class method (with a valid this ptr).
if called as a function the first parameter has to be
the object it is operating on, if called as a method
this is used.

#not yet testet, only commiting so that georg can
#continue working on ext/mysqli
2003-02-02 23:30:14 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Stanislav Malyshev
eccc536883 Make add_property_ functions work via write_property handler 2003-01-14 12:15:09 +00:00
Stanislav Malyshev
2ae8d124ce Remove handle_property from here too 2003-01-12 17:22:35 +00:00
Zeev Suraski
ace55f3251 Unify and make it easy to add code into the broken-string error handler 2003-01-09 15:32:22 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Andi Gutmans
e8214a3384 - Commit Marcus' cleanup of abstract and static inheritance and improve
- error messages
2002-11-23 20:44:12 +00:00
Andrei Zmievski
a35c61af3c MFZE1 2002-09-16 01:36:48 +00:00
Harald Radi
3738a6edd0 only check for an available class entry instead of
the std_object_handlers on some places

#some linuxtag work
2002-06-09 14:20:37 +00:00
Zeev Suraski
0450ab9462 MFZE1 (Expose more C++ APIs) 2002-05-20 07:17:30 +00:00
Stanislav Malyshev
7a067547cd Make OBJCE return zend_class_entry*, also some cleanups 2002-04-30 09:56:48 +00:00
Harald Radi
51e797f1e3 some type cleanup work 2002-04-23 18:06:54 +00:00
Harald Radi
6ac6cb1040 added get_class_entry callback handler to the
object handlers structure
2002-04-22 14:22:27 +00:00
Stanislav Malyshev
6608f07322 Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +00:00
Sebastian Bergmann
62dc854bb0 Happy New Year. 2002-01-06 15:21:36 +00:00
Derick Rethans
9b391a83c2 - MFZE1 for exit fix, exposing current function name in error messages and
exposing zend_zval_type_name().
2002-01-03 14:19:13 +00:00