Commit Graph

448 Commits

Author SHA1 Message Date
Jani Taskinen
f48cab06ff - Fixed bug #48971 (Missing ZEND_NS_NAMED_FE macro) 2009-07-28 21:12:42 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Dmitry Stogov
7d4fd3fd38 Fixed bug #46409 (__invoke method called outside of object context when using array_map) 2008-11-27 19:01:23 +00:00
Felipe Pena
fc2fb50d09 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-11-17 11:28:01 +00:00
Marcus Boerger
7126de4912 - Next step in namespaces, using / as namespace separator. 2008-11-04 15:58:55 +00:00
Felipe Pena
7a37fa2d6b - Revert ZEND_BEGIN_ARG_INFO change 2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-10-24 14:35:40 +00:00
Nuno Lopes
f87d4530c2 mark empty_fcall_info and empty_fcall_info_cache as constant. a few less bytes in the dirty page :P 2008-08-12 21:45:52 +00:00
Felipe Pena
cf7384aa40 - MFH: Constness (Added const qualifier to several function parameters) 2008-08-12 17:20:25 +00:00
Felipe Pena
e304515ddb - MFH: Added parameter TSRMLS_DC in zend_is_callable() 2008-08-02 04:46:07 +00:00
Dmitry Stogov
af05ce0af6 Fixed is_callable/call_user_func mess that had done different things for very similar arguments e.g. array("A","B") and "A::B" 2008-07-26 13:14:04 +00:00
Dmitry Stogov
feb8580166 LSB parent/self forwarding 2008-07-24 09:42:18 +00:00
Stanislav Malyshev
e59bfcffa0 deprecate zend_get_parameters_ex 2008-06-27 21:16:41 +00:00
Matt Wilmas
7da75d81e7 MFH: Add array_init_size() and use it where array size is known at initialization 2008-05-27 10:29:33 +00:00
Dmitry Stogov
907fa66507 Added API to use namesapces in internal extensions 2008-05-12 07:11:55 +00:00
Dmitry Stogov
2ecf4bb0a7 Lazy EG(active_symbol_table) initialization 2008-04-29 08:15:20 +00:00
Felipe Pena
cc2b17d51d MFH: Added new macro for check void parameters.
(deprecating ZEND_WRONG_PARAM_COUNT for this cases)
2008-03-10 22:02:41 +00:00
Marcus Boerger
e8a8acdf39 [DOC]
- Fix callable/static mess, the following will now all result in a E_STRICT
  . binding a dynamic function as a static callback
  . static call of a dynamic function
  . is_callable() on a static binding to a dynamic function
# [marcus@frodo PHP_5_3]$ php -a -d error_reporting=8191
# make: `sapi/cli/php' is up to date.
# Interactive shell
#
# php > class t{ function f() { echo "Funny\n"; } }
# php > $c = array("t","f");
# php > call_user_func($c);
#
# Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method t::f() cannot be called statically in php shell code on line 1
# Funny
# php > var_dump(is_callable($c));
#
# Strict Standards: Non-static method t::f() cannot be called statically in php shell code on line 1
# bool(true)
# php > t::f();
#
# Strict Standards: Non-static method t::f() should not be called statically in php shell code on line 1
# Funny
# php >
2008-02-01 21:27:55 +00:00
Dmitry Stogov
d90ebc65a6 Fixed comilation warnings 2008-01-24 18:07:45 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
b489251177 - MFH from HEAD:
. Folding tags
  . Parameter parsing
  . SPL debug info
  . array function improvements (not all yet)
  . Improvements to function calling with call_user_* functions
  . Improvements to debugging info in var_dump/print_r
# I propably forgot already something but this all was pretty close tied
# to each other so it wasn't possible to do it in parts.
2007-11-02 19:40:39 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Dmitry Stogov
72d0454bf6 Added support for __callstatic() magic method (missing part). (Sara) 2007-09-29 09:34:24 +00:00
Dmitry Stogov
b20ed0d2e0 Added support for __callstatic() magic method. (Sara) 2007-09-29 08:52:40 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Dmitry Stogov
e1814f0dbe WIN64 support 2007-04-16 08:09:56 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Hannes Magnusson
1e19ee8785 - Fixed incorrect function names on FreeBSD where inet_pton() was named
__inet_pton() and inet_ntop() was named __inet_ntop()
- Fixed bug #39685 (iconv() - undefined function)
- Fixed bug #38852 (XML-RPC Breaks iconv)
2006-12-20 10:34:36 +00:00
Dmitry Stogov
29ed52ffa4 New memory manager 2006-07-18 09:06:33 +00:00
Dmitry Stogov
ada4e506a7 MFH: Added automatic module globals management. 2006-06-15 14:03:21 +00:00
Marcus Boerger
64c353ab79 - MFH zend_fcall_info_*() and parameter parsing option 'f'
# Right now i see this as the best option but we might shuffle code around
# later if someone comes up with a better solution.
2006-06-07 09:43:54 +00:00
Antony Dovgal
9dd24c6d87 fix error messages when converting objects to other types
add new function
MFB will follow soon
2006-05-25 10:01:06 +00:00
Marcus Boerger
637a40423c - MFH as discussed
. zend_exception_get_default() -> zend_exception_get_default(TSRMLS_D)
  . zend_get_error_exception()   -> zend_get_error_exception(TSRMLS_D)
  . added E_RECOVERABLE_ERROR
  . added ZEND_TOSTRING_FUNC_NAME
  . added __tostring function cache to zend_class_entry
  . added ZEND_NAMED_ME
  . modified ZEND_ME_MAPPING to support method flags
  . added ZEND_MN
  . method entries now use prefix "zim_" instead of "zif_"
  . drop EG(ze1_compatibility_mode)
  . changed cast handler, now without (int should_free):
    typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
  . changed get_iterator, now receives whether value is by ref:
    zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
  . added zend_objects_store_add_ref_by_handle
  . added zend_objects_store_del_ref_by_handle
  . convert_to_explicit_type(pzv, type)
2006-05-09 23:53:23 +00:00
Marcus Boerger
35ce5db25e - Add missing function for completeness 2006-03-05 16:12:24 +00:00
Marcus Boerger
941b0651dc - MFH: Function deprecation flag 2006-02-25 18:25:45 +00:00
Andi Gutmans
61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Marcus Boerger
0cd997d79c - Simplify and synch is_callable_ex() with actual execution code
. Allow array($this, 'parent::method') for function 'pointers'
  . Spit out E_STRICT in case of erroneous use of function 'pointers'
2005-12-16 22:15:41 +00:00
Dmitry Stogov
8768ab94b3 Fixed bug #34729 (Crash in ZTS mode under Apache) 2005-12-01 11:48:17 +00:00
Dmitry Stogov
b05b949a47 Fixed bug #34879 (str_replace, array_map corrupt negative array indexes on 64-bit platforms) 2005-10-28 14:46:30 +00:00
Marcus Boerger
2486b846cc - MFH zend_is_callable_ex() returns zend_class_entry* if available 2005-10-25 23:19:59 +00:00
Dmitry Stogov
248345d920 Support for class constants and static members for internal classes 2005-09-01 10:05:32 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Marcus Boerger
53e5260662 - Add convenience function zend_is_callable_ex() and base zend_is_callable
and zend_make_callable on it. This functions allows to check if a php
  variable is a callable function and returns its function pointer as well
  as object if possible.
# Commit this now so we can use it in 5.1.* series as discussed with Andi.
2005-07-28 20:55:50 +00:00
Dmitry Stogov
70bd938bbd Fixed bug in new module statrup mechanism 2005-07-18 16:20:08 +00:00
Dmitry Stogov
345e0255b5 Fixed bug #33512 (Add missing support for isset()/unset() overloading to complement the property get/set methods) 2005-07-07 16:07:09 +00:00
Dmitry Stogov
1d33a3e95e Fixed bug #31158 (array_splice on $GLOBALS crashes) 2005-07-04 10:01:10 +00:00
Dmitry Stogov
2ca2dc0b08 Restored old behavior of zend_statup_module() 2005-06-30 13:43:00 +00:00
Stanislav Malyshev
d5a1296008 fix various "Class entry requested for an object without PHP class" messages
when working with non-PHP objects.
# Using Z_OBJCE(object)->name is usually bad idea unless you know it's
# a pure PHP object
2005-06-27 18:13:13 +00:00
Dmitry Stogov
c0c7a9f010 Improved PHP extension loading mechanism with support for module dependencies and conflicts. 2005-06-17 09:36:26 +00:00
Dmitry Stogov
aedbdb087d Allowed return by refrence from internal functions 2005-06-16 14:56:13 +00:00
Dmitry Stogov
1a72341328 Added array type hinting. (This patch requires full re-make) 2005-05-26 13:46:17 +00:00
Dmitry Stogov
c81db6bc56 Fixed bug #29210 (Function: is_callable - no support for private and protected classes) 2005-04-27 15:45:36 +00:00
Marcus Boerger
67a226d910 - Add ReflectionProperty::getDocComment() 2005-04-19 22:04:59 +00:00
Marcus Boerger
c087f07233 - These must be initailized 2005-02-27 22:18:55 +00:00
Hartmut Holzgraefe
d88c2b18d4 added some missing zend_[declare|update]_property_...() convenience
functions for bool, double and binary safe string data
2005-02-04 20:24:21 +00:00
Marcus Boerger
1d5c13bdad - Fix #31651 (ReflectionClass::getDefaultProperties segfaults with arrays.) 2005-01-22 12:23:01 +00:00
Andi Gutmans
11bcaedfc8 - Rename delete_global_variable() to zend_delete_global_variable() 2004-10-04 20:17:06 +00:00
Andi Gutmans
db507dd153 - Commit the variable fetch optimization.
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
2004-10-04 19:54:35 +00:00
Marcus Boerger
e39f3f3f48 Simplify/Optmize magic method calls (__get/__set/__call/__clone/__destruct) 2004-09-28 22:55:22 +00:00
Andi Gutmans
6bd3c36a53 - Recommit:
- Check signature of magic methods
  - Register __get/__set/__call for internal classes
2004-09-09 16:51:45 +00:00
Andi Gutmans
96ab56e146 - Roll back VM commit 2004-09-09 16:47:22 +00:00
Marcus Boerger
be24e2455c - Check signature of magic methods
- Register __get/__set/__call for internal classes
2004-09-09 09:51:43 +00:00
Andi Gutmans
56f8195fe5 - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
  STR_FREE() and zval_dtor() always have to check for it and it slows down
  the general case. In addition, it seems that empty_string has been abused
  quite a lot, and was used not only for setting zval's but generally in
  PHP code instead of "", which wasn't the intention. Last but not least,
  nuking empty_string should improve stability as I doubt every place
  correctly checked if they are not mistakenly erealloc()'ing it or
  calling efree() on it.
  NOTE: Some code is probably broken. Each extension maintainer should
  check and see that my changes are OK. Also, I haven't had time to touch
  PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Marcus Boerger
c756609658 Add missing declaration 2004-06-10 12:32:09 +00:00
Marcus Boerger
33cdc9ed36 Fix order of macro parameter (synch with other macros) 2004-04-12 13:02:54 +00:00
Marcus Boerger
5230321731 - Fix Reflection class names
- Add ability to get the extension an internal class was defined in
# This is the patch Andi and me used to search for underscrores...
2004-03-30 18:36:53 +00:00
Derick Rethans
6535933f7c - Replaced the exec_finished hook by the zend_post_deactive hook for
extensions. The new hook will be run after the symbol table and destructors
  are run. (Derick)
2004-03-16 22:27:26 +00:00
Marcus Boerger
8d45fece42 Fix zend_parse_method_parameters_ex() and make it consistant with
zend_parse_method_parameters().
# Obviously its only place of use is in pdo just right now.
2004-03-02 16:17:58 +00:00
Zeev Suraski
7086634a0b - Improve ARG_INFO() macros to support supplying required_num_args
- Initial fix for foreach($o->mthd()->arr) crash (now leaks)
2004-02-25 14:56:45 +00:00
Hartmut Holzgraefe
1727c6a2bb more EXTERN_C wrapping of ZEND_API prototypes 2004-02-20 08:03:27 +00:00
Zeev Suraski
e7e0f7d4b4 - Check return-by-reference bit when implementing interface prototypes
- Add infrastructure for built-in functions to hint whether they
  return by reference or not.  It is NOT currently used for anything,
  except for interface prototypes (you can use it to request that the
  function that implements your prototype returns by reference or
  doesn't return by reference).
  For downwards compatibility - by default, interface prototypes are
  agnostic as to whether the function that implements them returns
  by reference or not.  Use ZEND_BEGIN_ARG_INFO_EX() with
  ZEND_RETURN_VALUE/ZEND_RETURN_REFERENCE to change that.
- Fix ArrayAccess::getOffset() to conduct additional checks.
  If your getOffset() should work with multidimensional arrays - it
  must return by reference.
2004-02-12 13:49:55 +00:00
Marcus Boerger
805dfab890 Add zend_get_module_started() to quickly check whether a module is present
and its MINIT function has been called.
2004-01-19 00:39:29 +00:00
Marcus Boerger
61fc2a9209 Add missing macro
# by popular demand, more and more exts need this
2004-01-12 00:19:40 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Marcus Boerger
15964bb35d Fix order of class_entry member initialization (needed for example for DOM)
# You need to completley rebuild PHP after this patch.
2003-12-28 15:18:05 +00:00
Wez Furlong
273c19334b export these symbols for use by SPL as a shared extension 2003-12-22 13:09:15 +00:00
Marcus Boerger
32927a9ffb Free the zval container only if it should be freed and was not copied. 2003-12-02 07:09:46 +00:00
Marcus Boerger
6344f662a5 This takes the address of a zval ptr 2003-11-29 18:23:35 +00:00
Marcus Boerger
c7d27ad938 Add macros to return values of other zvals.
This is needed because one cannot use REPLACE_ZVAL_VALUE with return_value.
2003-11-29 18:15:11 +00:00
Marcus Boerger
c21d597426 Add method alias macro 2003-11-18 19:18:54 +00:00
Marcus Boerger
26bfe3f83a Add zend_make_callable() which allows to make zval's callable zval's.
At the moment this function only converts strings of the form class::method
to an array(class,method).
2003-10-25 22:58:06 +00:00
Marcus Boerger
3c62b3b5ac Expand Interface C API.
In short: zend_class_entry->interface_gets_implemented()  allows to modify
the class entry of a class when an interface gets implemented.
2003-10-22 19:59:58 +00:00
Marcus Boerger
b0b82541e8 Fix class/iterator relationship & handling 2003-10-18 18:43:31 +00:00
Marcus Boerger
25aa8b715e Added c-api for iterators
# After 4 Month work and endless discussions...
2003-10-17 17:19:44 +00:00
Marcus Boerger
4073a08488 Add oo support function zend_class_implements() 2003-10-15 06:24:17 +00:00
Shane Caraveo
05152d3845 this little piggy broke lots of things...eg. _function_check_flag in reflection api. 2003-10-05 01:54:46 +00:00
Moriyoshi Koizumi
be5cbf9999 Ensure lval to have a *boolean* value. 2003-10-03 16:57:41 +00:00
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
Andi Gutmans
73b159e056 - Experimental support for destructors. We need to see if destructors
- will actually work well in the context of PHP so we should consider this
- as experimental. Possible problems might be that when the constructor is
- run PHP might not be in a stable state.
2001-12-27 14:35:09 +00:00
Andi Gutmans
29ea3da2f8 - Pretty much finish _clone() support 2001-12-26 19:54:20 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
2eccd95ca4 - Add some initializations 2001-11-03 12:19:52 +00:00
Sebastian Bergmann
01850714ee MFZE1: Introduced extension version numbers (Stig) 2001-10-12 18:40:30 +00:00
Stanislav Malyshev
f5c5986344 _FUNCTION is used in definition, so use _D 2001-08-12 14:58:57 +00:00
Andi Gutmans
76a7a5bc18 - More work on making objects work 2001-08-11 18:26:47 +00:00
Zeev Suraski
4f6c95d17a Whitespace 2001-08-11 15:56:40 +00:00
Andi Gutmans
8b6f848cbb - Merge from Engine 1 2001-08-10 16:19:49 +00:00
Andi Gutmans
61edd1bf41 - Merge from Engine 1 CVS 2001-08-10 13:39:35 +00:00
Andi Gutmans
54e871a9cc - Use Z_ macros 2001-08-06 02:48:55 +00:00
Zeev Suraski
fcc035108f TSRMLS_FETCH work 2001-08-05 01:37:10 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
4187439cff More TSRMLS_FETCH work 2001-07-30 07:43:02 +00:00
Zeev Suraski
b52554951f More TSRMLS_FETCH work, and get rid of redundant ParametersPassedByRef 2001-07-30 05:34:21 +00:00
Andrei Zmievski
3839af35dc Let's be consisten and keep TSRMLS_DC declaration after num_args. 2001-07-30 05:05:26 +00:00
Zeev Suraski
8ce8324e59 More TSRMLS_FETCH annihilation 2001-07-30 04:54:16 +00:00
Zeev Suraski
11e5d2f229 Get rid of more TSRMLS_FETCH's 2001-07-30 02:07:52 +00:00
Zeev Suraski
b57703825b Avoid TSRMLS_FETCH()'s (still lots of work left) 2001-07-30 01:48:22 +00:00
Zeev Suraski
2c254ba762 Get rid of ELS_*(), and use TSRMLS_*() instead.
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:10:39 +00:00
Zeev Suraski
43ebb86806 Fix bug #10287 - avoid crashing under a bogus usage of list() 2001-07-16 15:48:31 +00:00
Thies C. Arntzen
07ea068454 fixed ZVAL_FALSE and ZVAL_TRUE 2001-07-11 12:40:29 +00:00
Thies C. Arntzen
bcddfd474a cleaned up the RETVAL_ RETURN_ and ZVAL_ macros
added check for \0 at end-of-string at some places. all strings in PHP
have to be terminated with \0 because 3th party libraries might not be
binary-safe.
2001-07-10 08:20:20 +00:00
Andrei Zmievski
58f88057b1 Adding new parameter parsing API. 2001-07-09 18:51:29 +00:00
Andi Gutmans
02af513c0d - Patch from Jason Greene.
- Make it easier to write PHP function definitions in more than just one .c
  file while accessing the same module globals.
2001-04-19 17:51:23 +00:00
Andrei Zmievski
13148b5491 Improve zend_is_callable() to the point where it's actually useful.
Now it just needs to be invoked everywhere in PHP where a callback is
expected.
2001-03-12 03:08:28 +00:00
Andi Gutmans
7080fa5b53 - Rename modules.h to zend_modules.h 2001-02-26 18:18:34 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Andrei Zmievski
8fe036596f Added zend_is_callable() function that checks whether passed zval
represents a valid and exiting callable construct.
2001-02-01 05:01:26 +00:00
Andi Gutmans
0611acb910 - Change unset() functions to null(). unset() is legacy 2001-01-31 21:53:30 +00:00
Andi Gutmans
2f2d32fa61 - Quick fix. I'm for changing these to add_property_null() as we've nuked
- unset.
2001-01-31 05:21:53 +00:00
Andrei Zmievski
57f99633ce Make add_index_zval() available to the outside world. 2001-01-22 20:40:41 +00:00
Andi Gutmans
ef95a346f1 - Patch from Sterling. Add API calls to add zval's as array indeces/
object properties. Add _ex functions which take the string length as an
  argument for better performance.
2001-01-20 19:16:38 +00:00
Andi Gutmans
0a3761e283 - For Sterling. I wonder if not all of the API functions should take the
- key_length as a parameter in order to save that strlen().
2001-01-19 08:40:49 +00:00
Zeev Suraski
be895bcb96 Fix call_user_function() with objects - it could leak under certain circumstances 2000-12-13 22:50:10 +00:00
Stanislav Malyshev
1f793fd06c Fix EMPTY_STRING macros 2000-08-17 08:48:16 +00:00
Sascha Schumann
b982307dd1 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

    All identifiers that begin with an underscore and either an uppercase
    letter or another underscore are always reserved for any use by the
    implementation.
2000-07-02 23:54:19 +00:00
Zeev Suraski
3cda6a750e Allow the symbol_table to be passed to call_user_function_ex() 2000-06-17 16:50:38 +00:00
Sascha Schumann
df74f1dfab Add optional support for C0x inline semantics.
These are enabled by specifying `--enable-c0x-inline' on the command
line. We might add an autoconf check for this particular feature
later.
2000-06-13 17:58:33 +00:00
Zeev Suraski
fce92e3ca2 Avoid using E_CORE_* errorlevels in any place which is not in the global startup sequence 2000-06-12 20:22:17 +00:00
Andi Gutmans
eb0e694665 - Andrei, this is for you!
- Add zend_register_internal_class_ex() which allows you to specify a
- parent to inherit from. You can either specify the parent directly or via
- its name.
2000-06-09 14:40:14 +00:00
Andi Gutmans
6ce07a85e4 - Change register_internal_class to zend_register_internal_class for
- consistency.
- Andrei: I'm still thinking about the _ex you want me to implement
2000-06-09 08:41:59 +00:00
Zeev Suraski
bc7abb3300 Allow disabling of functions for security reasons 2000-05-29 17:16:52 +00:00
Sascha Schumann
0b6d923bae Add ZEND_GET_MODULE(name). This is a short-cut for the common
get_module function.
2000-05-02 01:33:18 +00:00
Zeev Suraski
131d9cb2dc *** empty log message *** 2000-04-01 16:23:13 +00:00
Zeev Suraski
0d21940d54 Generalize some common thread-safety stuff 2000-04-01 14:15:20 +00:00
Andi Gutmans
e9d126a7d3 - Make sure zend_API.h has Zend'ish versions of the ZEND macros so that
Zend'ish modules don't need to mix PHP & Zend notation.
2000-03-29 17:13:16 +00:00
Zeev Suraski
5dba477467 - Some header dependencies cleanup
- Generalize zval_print() and zval_print_r()
2000-03-25 19:10:07 +00:00
Andi Gutmans
bf18f87644 - Move #defines 2000-03-21 18:48:28 +00:00
Zeev Suraski
5e55e47f7f It's official now... 2000-03-06 05:26:39 +00:00
Zeev Suraski
0ac9536d99 (c) patch 2000-02-19 22:46:42 +00:00
Zeev Suraski
ceba50b6ed - Fix a nasty bug in the hash, introduced in the recent migration to macros
- Make array_init() and friends trackable
2000-02-19 19:21:45 +00:00
Zeev Suraski
f77e6a4499 Generalize macros 2000-02-19 13:11:39 +00:00
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andi Gutmans
bc5c9d8d7b - Finally beautify those WIN32|WINNT checks 2000-02-10 17:03:53 +00:00
Andrei Zmievski
e0628436f3 *** empty log message *** 2000-02-03 18:51:33 +00:00
Andrei Zmievski
b995d2cc2f Added add_property_unset() and add_property_bool(). 2000-02-01 23:12:48 +00:00
Thies C. Arntzen
fb6a1b8b83 RETURN_NULL -> RETURN_NULL() // we don't want macros without an argumnet 2000-01-19 09:38:45 +00:00
Thies C. Arntzen
cd377b646d RETURN_NULL & RETVAL_NULL don't need (). 2000-01-18 08:40:45 +00:00
Thies C. Arntzen
af22085c51 added ZVAL_*() macros. 2000-01-04 13:56:17 +00:00
Andi Gutmans
bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Thies C. Arntzen
bc6811ec90 renamed RET???_UNSET -> RET???_NULL 2000-01-02 11:44:33 +00:00
Zeev Suraski
f2d703e916 - Nuke undefined_variable_string
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Thies C. Arntzen
546af70783 new constant: SQL_NULL
new macros: RETURN_SQLNULL,RETVAL_SQLNULL,IS_SQLNULL
1999-12-28 12:05:48 +00:00
Zeev Suraski
b7a5b3c309 - Generalize the fast cache mechanism
- Add the HashTable struct to the fast cache mechanism
1999-12-27 19:07:33 +00:00
Zeev Suraski
aec33aa753 Introduce a zval-specific cache - 5-15% speed improvement 1999-12-26 21:56:59 +00:00
Zeev Suraski
235386b245 Change ALLOC_ZVAL() semantics 1999-12-26 21:21:33 +00:00
Andi Gutmans
62b2087a84 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend use
them.
1999-12-24 15:22:11 +00:00
Zeev Suraski
1fe57c9505 - Fix function_exists() 1999-12-22 18:49:23 +00:00
Zeev Suraski
223c674c2a - Made things work again (Thies, everybody - please check the latest CVS and see if you're
still getting any problems)
- Changed the interface of call_user_function_ex() to support returning of references
1999-12-19 18:54:40 +00:00
Zeev Suraski
a1ad2872ee - The tree compiles again 1999-12-18 22:40:35 +00:00
Zeev Suraski
cd7d5546ae - Introduce ZEND_NUM_ARGS(), to replace ARG_COUNT(ht)
- Rename getParameters() and friends for consistency and namespace cleanliness
1999-12-18 22:23:23 +00:00
Andrei Zmievski
f962a35df7 Added zend_set_hash_symbol() function. 1999-12-04 16:50:18 +00:00
Thies C. Arntzen
0a276c2ff3 backed out last change after andi decided on a different approach. 1999-12-04 16:08:43 +00:00
Andi Gutmans
4c8259b538 - Call ZEND_SET_SYMBOL_WITH_LENGTH() with refcount 1 from the standard
ZEND_SET_SYMBOL()
1999-12-04 14:56:44 +00:00
Thies C. Arntzen
502bb337fe the new SET_VAR_* macros forgot to set the refcount! 1999-12-04 13:18:08 +00:00
Andrei Zmievski
e345066140 *** empty log message *** 1999-12-03 17:03:35 +00:00
Andrei Zmievski
fec413c557 Added ZEND_SET_GLOBAL_VAR_WITH_LENGTH_EX() macro. 1999-12-03 16:59:04 +00:00
Andi Gutmans
c34560b53d - Remove _EX and make it the old _LENGTH 1999-12-03 07:54:17 +00:00
Andi Gutmans
2f5efbdea6 - Add _EX macro for Andrei 1999-12-02 20:38:41 +00:00
Zeev Suraski
2ddc4fe4f5 Make it possible to explicitly set refcount in ZEND_SET_SYMBOL_WITH_LENGTH(), part 2 1999-12-01 22:00:58 +00:00
Zeev Suraski
158088ca1a Allow to set the reference count explicitly for ZEND_SET_SYMBOL_WITH_LENGTH() 1999-12-01 21:47:47 +00:00
Andi Gutmans
6d988ec694 - Add support for BYREF_FORCE_REST 1999-11-03 19:21:56 +00:00
Andrei Zmievski
52a30fd21b Be safe, use (). 1999-10-18 14:17:36 +00:00
Thies C. Arntzen
6847fefad9 added add_*_resource() and add_*_bool() functions 1999-10-04 11:42:46 +00:00
Andi Gutmans
86357a9c27 - Move is_ref back to being an unsigned char and not a bit field. 1999-10-01 23:31:39 +00:00
Andi Gutmans
4dd47ffbc1 - Remove locking support completely 1999-10-01 23:26:00 +00:00
Thies C. Arntzen
446e5d0fff added add_property_resource 1999-09-29 15:25:06 +00:00
Andi Gutmans
06a18f169b - Add some internal functions to Zend 1999-09-20 16:56:09 +00:00
Zeev Suraski
6393ab1486 Now that's an annoying bug. 1999-08-06 16:54:32 +00:00
Zeev Suraski
f95edc016b Introduce call_user_func_ex() 1999-08-06 15:24:10 +00:00
Zeev Suraski
01c2701a0f These aren't necessary 1999-07-31 18:48:47 +00:00
Zeev Suraski
620d013499 Support symbols in any symbol table, not just the active one 1999-07-30 14:17:08 +00:00
Zeev Suraski
48ffdd79f7 * Setting variables in the global scope wasn't handling is_ref's properly 1999-07-30 02:49:12 +00:00
Zeev Suraski
8d1de13aef 0.91 update 1999-07-19 20:02:12 +00:00
Zeev Suraski
b5b1117760 License update 1999-07-16 14:58:16 +00:00
Zeev Suraski
2a6da7814c Step 4:
Move to a 7-bit counter (not fully implemented yet)
1999-07-09 20:43:59 +00:00
Zeev Suraski
5f62c347c7 Step 2:
Rename is_ref to EA
1999-07-09 17:44:41 +00:00
Thies C. Arntzen
eb5c6da5a4 added RETVAL_RESOURCE and RETURN_RESOURCE 1999-07-05 06:26:29 +00:00
Zeev Suraski
9108abc287 Minor updates (mostly __declspec() stuff) 1999-06-04 11:44:02 +00:00
Thies C. Arntzen
a3a60dd4e7 added is_ref=0 and refcount=1 to SET_VAR_* macros 1999-06-04 09:04:05 +00:00
Zeev Suraski
741b816136 * Support getThis() for internal functions.
* Fix 'new object or die' and AiCount issue thoroughly (earlier fix didn't
  work with the optimizer).
* Add new macros for standardized definition of classes.
* Only report AiCount problems if shutdown was not silent.
1999-05-28 12:06:59 +00:00
Zeev Suraski
1f985ede74 Moved all #define's for SET_ and RETURN_ to zend_API.h 1999-05-27 01:44:17 +00:00
Zeev Suraski
bfbe86187e Almost forgot to commit those 1999-05-09 12:24:21 +00:00
Zeev Suraski
942f409292 * Change the thread safe project to create a C++ scanner.
* Add in a slightly modified skeleton file (only a couple of #if's for #include's
that we dont have in Windows)

It does NOT compile or work yet :)
1999-04-21 20:13:02 +00:00
Zeev Suraski
7a87fcbbda Thread safety patch. We're still not quite there but it compiles again, and
more logic has been implemented.
1999-04-21 03:49:09 +00:00
Andi Gutmans
9deab4118d Add a couple of ZEND_API's 1999-04-19 18:57:14 +00:00
Zeev Suraski
342c6e0b23 Whatnot:
* updated alloc_persist to use critical sections
* changed extension shutdown to two-phase
* updated dependencies
* PR support (don't remember if there was any really)
1999-04-18 15:11:52 +00:00
Andi Gutmans
39f9487ee1 -Tiny patches 1999-04-14 19:53:33 +00:00
Zeev Suraski
39a7f4c306 This patch is a go. Not fully optimized yet, but working properly.
Prepatch tagged as BEFORE_STACK_PATCH.
1999-04-12 18:29:09 +00:00
Andi Gutmans
573b46022c Zend Library 1999-04-07 18:10:10 +00:00