Commit Graph

446 Commits

Author SHA1 Message Date
Marcus Boerger
aea24b2a79 Force destructors to have empty signatures 2004-03-26 20:05:35 +00:00
Marcus Boerger
50ee116f08 Clearify the different method/class flags (as discussed with Andi). 2004-03-09 16:38:37 +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
Marcus Boerger
7fdd68af8b Add some comments 2004-02-27 18:20:53 +00:00
Marcus Boerger
f449c8fdf7 Fixes for abstract classes/methods 2004-02-27 09:14:55 +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
Zeev Suraski
36a751840d - Abstract methods cannot have defaults for arguments
- Make function foo($a, $b=null) satisfy both foo($a) and foo($a, $b)
  prototypes
2004-02-25 09:25:37 +00:00
Marcus Boerger
ce8f77f7b1 Fix class flags when handling abstract methods 2004-02-24 23:39:12 +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
3ca44539a1 Switch from ZEND_ACC_DYNAMIC to ZEND_ACC_ALLOW_STATIC and disallow calling
internal non-static methods statically.
# As discussed with Zeev:
# - For BC standard userspace methods allow this with an E_STRICT message.
# - If you want to implement an internal method taht can be called both
#   statically and non-statically then use flag ZEND_ACC_ALLOW_STATIC.
# - Magic user space methods __*() cannot and __construct, __destruct,
# __clone can never be called statically.
2004-01-24 16:59:24 +00:00
Marcus Boerger
6020ffd007 Simplify detection of methods that must be called dynamic (with object) 2004-01-23 22:04:42 +00:00
Marcus Boerger
7c2e02d380 Disallow static declaration of clone 2004-01-23 20:52:39 +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
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
Stanislav Malyshev
bced21b357 Fix bug #26543 - check parent:: and self:: in class names 2004-01-05 12:10:35 +00:00
Derick Rethans
6923a16c26 - Fixed var_export() to show public, protected and private modifiers properly.
- Exported (un)mangle_property_name.
2004-01-03 13:51:02 +00:00
Marcus Boerger
2a6ec5ccb4 WS 2003-12-28 16:20:06 +00:00
Wez Furlong
273c19334b export these symbols for use by SPL as a shared extension 2003-12-22 13:09:15 +00:00
Andi Gutmans
23b231d0eb - Revert the revert of these patches. This overloading can only be used
- by C extensions such as SimpleXML and *NOT* PHP code. Reasons given
- on the mailing list and problem with reentrancy inside the opcodes.
2003-12-02 21:09:24 +00:00
Andi Gutmans
ee64b61e94 - Revert auto-conversion in parameter API 2003-12-01 11:50:57 +00:00
Ilia Alshanetsky
7203684680 Add removed lcname, it is still needed. 2003-11-28 14:42:25 +00:00
Marcus Boerger
1586f714fe Convert objects to string if string is required by newer parameter parsing
since we do this for older parameter parsing does so too.
2003-11-27 19:24:38 +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
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
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
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
4073a08488 Add oo support function zend_class_implements() 2003-10-15 06:24:17 +00:00
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
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
Stanislav Malyshev
6ed305945d Fix namespace issues 2003-04-04 12:25:47 +00:00
Andrei Zmievski
e3f1641527 Patch from Timm Friede for when EG(active_namespace) is NULL initially. 2003-04-03 19:05:25 +00:00
Andrei Zmievski
91eff553e3 Initialize all relevant zend_class_entry fields to avoid accidental
crashes.
2003-04-03 14:44:41 +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
Zeev Suraski
5097be302e Initial support for enforcing prototype of abstract/interface method implementations 2003-03-29 11:19:38 +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
Sebastian Bergmann
866332a4b8 Eliminate TSRMLS_FETCH() calls in zend_objects_new() and zend_objects_get_address(). 2003-03-26 06:32:53 +00:00
Andrei Zmievski
3a297fac22 Lowercase the function name when used as key in the function name. The
original case is still preserved in zend_function structure.
2003-03-19 21:07:49 +00:00
Andrei Zmievski
dedfa808bb Fix warning in va_start(). 2003-03-13 20:41:58 +00:00
Andrei Zmievski
0c571538a8 Initialize the namespace when registering functions.
# Correct me if I'm wrong..
2003-03-12 21:43:42 +00:00
Harald Radi
3f8c08b5e1 add missing strtolower 2003-03-03 01:56:14 +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
Sebastian Bergmann
6d300baf84 ZTS fixes 2003-02-16 11:34:49 +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
Zeev Suraski
c17c7a2bfa Centralize class initialization 2003-02-10 16:11:24 +00:00
Zeev Suraski
5e12de9510 Add missing destructors 2003-02-10 11:03:22 +00:00
Georg Richter
325f9edb07 fixed zend_parse_method_param 2003-02-08 20:54:02 +00:00
Zeev Suraski
17439aa9c4 Rework static class properties - now supports access restrictions 2003-02-05 13:35:52 +00:00
Zeev Suraski
471947b188 Reimplement PPP properties 2003-02-04 12:12:34 +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
Sascha Schumann
0ceb4a93b2 Replace snprintf() call using zend_error's capabilities 2003-01-26 23:15:30 +00:00
Stanislav Malyshev
5340b204ca fix memory leaks and key size 2003-01-14 15:12:35 +00:00
Stanislav Malyshev
eccc536883 Make add_property_ functions work via write_property handler 2003-01-14 12:15:09 +00:00
Andrei Zmievski
efaa31e940 Automatically register constructor, destructor, and clone function when
class methods are registered.
2003-01-10 14:41:53 +00:00
Zeev Suraski
9b09ba614d Win32 build fix 2003-01-01 12:38:55 +00:00
Zeev Suraski
57b9b0112d Fix Wez's problem 2003-01-01 09:34:39 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Zeev Suraski
e062dffe6c - Implement public/protected/private methods.
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-06 17:09:44 +00:00
Andi Gutmans
671fff2fde h WHitespace 2002-11-30 11:20:25 +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
Derick Rethans
2a9f250ec7 - Initialize all functions to non-static (patch by Marcus Börger
<marcus.boerger@t-online.de>.
2002-11-22 10:49:46 +00:00
Ilia Alshanetsky
d3617c51b8 MFZE1 zend_str_tolower issue. 2002-10-09 14:21:40 +00:00
Ilia Alshanetsky
ee7b8f906d MFZE1 2002-09-26 18:56:11 +00:00
Andrei Zmievski
a35c61af3c MFZE1 2002-09-16 01:36:48 +00:00
Andi Gutmans
43139dc755 - WS - Always use "if (" and not "if(" 2002-09-15 07:45:26 +00:00
Andi Gutmans
bc5ea87e28 - Commit patch to support protected member variables (by Timm Friebe w/
- some fixes by me).
- You can't access protected variables from outside the object. If you want
- to see a protected member from your ancestors you need to declare the
- member as protected in the class you want to use it in. You can't
- redeclare a protected variable as private nor the other way around.
2002-07-15 18:09:56 +00:00
Andi Gutmans
28247f572a - Centralize global class fetch 2002-06-26 14:24:23 +00:00
Stanislav Malyshev
7a067547cd Make OBJCE return zend_class_entry*, also some cleanups 2002-04-30 09:56:48 +00:00
Harald Radi
8bf59c8fd0 MFZE1 saschas 'Avoid exceeding buffer limits' patch 2002-04-24 15:46:40 +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
Andi Gutmans
fb6976e46d - Another couple of indirection fixes.
- Make class_entry->refcount be part of the structure and not allocated.
2002-03-12 19:22:29 +00:00
Stanislav Malyshev
b75ffba9bb Fix standard object creation 2002-03-12 11:28:30 +00:00
Stanislav Malyshev
92dd5e611b - make class tables contain class_entry *, not class_entry
- fix isset($this)
2002-03-12 10:08:47 +00:00
Andrei Zmievski
a8609b1ba7 MFZE1 2002-03-01 17:34:52 +00:00
Andrei Zmievski
2310414868 MFZE1 2002-03-01 17:26:31 +00:00
Andi Gutmans
d1eea3de9c - Fix bug in nested try/catch's
- Infrastructure for implementing imports of methods.
2002-03-01 14:04:51 +00:00
Andi Gutmans
00e90f2ff3 - Experimental support for private members.
<?
	class MyClass {
		private $Hello = "Hello, World!\n";

		function printHello()
		{
			print $this->Hello;
		}
	}

	class MyClass2 extends MyClass {
		function printHello()
		{
			MyClass::printHello(); /* Should print */
			print $this->Hello; /* Shouldn't print out anything */
		}
	}

	$obj = new MyClass();
	print $obj->Hello; /* Shouldn't print out anything */
	$obj->printHello(); /* Should print */

	$obj = new MyClass2();
	print $obj->Hello; /* Shouldn't print out anything */
	$obj->printHello();
?>
2002-02-21 11:50:44 +00:00
Stanislav Malyshev
cefbdccb98 Pass TSRM to create_object 2002-02-14 09:20:51 +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
f4b832d277 - Fix crash bug in startup code.
- Start work on being able to reference global and local scope
2001-12-13 16:55:04 +00:00
Andi Gutmans
74efc41fc3 - Make classes have scope and function/constant lookups default to the class 2001-12-12 17:38:37 +00:00
Andi Gutmans
4cb97fa3b9 - Rename zend_class_entry.constants -> zend_class_entry.constants_table 2001-12-11 18:46:43 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
3bfee898db - More namespaces work.
- Nuke memory leak.
2001-12-10 18:57:17 +00:00
Andi Gutmans
94cfe03da5 - Revert one of the changes because it might be before the memory
- manager has started.
2001-12-01 08:46:02 +00:00
Andi Gutmans
bb9a36cad1 - Use alloca() when possible. 2001-12-01 08:33:48 +00:00
Andi Gutmans
e858d27888 - Initial support for class constants. There are still a few semantic
- issues which need to be looked into but basically it seems to work.
- Example:
<?php
	class foo
	{
		const hey = "hello";
	}

	print foo::hey;
?>
2001-11-30 16:29:47 +00:00
Andi Gutmans
d2da63f629 - Support static members. The following script works:
<?
	class foo
	{
		class bar
		{
			function init_values()
			{
				for ($i=1; $i<10; $i++) {
					foo::bar::$hello[$i] = $i*$i;
				}
			}

			function print_values()
			{
				for ($i=1; $i<10; $i++) {
					print foo::bar::$hello[$i] . "\n";
				}
			}
		}
	}

	foo::bar::init_values();
	foo::bar::print_values();

	for ($i=1; $i<10; $i++) {
		print $hello[$i]?"Shouldn't be printed\n":"";
	}
?>
2001-11-25 08:49:09 +00:00
Andi Gutmans
0a682c6d70 - Fix internal classes 2001-10-29 18:10:36 +00:00
Andrei Zmievski
3ead31449f MFHZ1 2001-10-20 13:55:47 +00:00
Sebastian Bergmann
01850714ee MFZE1: Introduced extension version numbers (Stig) 2001-10-12 18:40:30 +00:00
Andi Gutmans
e2efa0196f - Merge Andrei's fix from Engine 1. Please commit patches to both trees! 2001-08-26 15:14:45 +00:00
Zeev Suraski
8722b31d8a MFZE1 2001-08-13 00:28:18 +00:00
Andi Gutmans
76a7a5bc18 - More work on making objects work 2001-08-11 18:26:47 +00:00
Andi Gutmans
532677e7ac - Fix some places which create objects. The fixes are ugly and will be
revised when things start working well
2001-08-11 18:04:07 +00:00
Zeev Suraski
4f6c95d17a Whitespace 2001-08-11 15:56:40 +00:00
Andi Gutmans
5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +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
e8ac55d03c More TSRMLS_FETCH work 2001-07-30 06:12:15 +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
b4f3b9d3ce Redesigned thread safety mechanism - nua nua 2001-07-28 10:51:54 +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
87e3924379 Remove the last couple of bogus inlines 2001-07-11 17:18:22 +00:00
Zeev Suraski
ed542331b7 Get rid of some inlines 2001-07-11 09:33:41 +00:00
Andrei Zmievski
58f88057b1 Adding new parameter parsing API. 2001-07-09 18:51:29 +00:00
Rasmus Lerdorf
fb8e614690 Trivial fix - but the period looks odd in error messages 2001-07-03 04:18:38 +00:00
Andrei Zmievski
555fa77930 Nuke unused variable. 2001-05-09 20:37:16 +00:00
Andrei Zmievski
41aebd058e Fix a few bugs in zend_is_callable() and make it stricter. 2001-05-09 20:07:49 +00:00
Andi Gutmans
acd56b0891 - More whitespace fixes while I'm at it. 2001-04-27 18:53:25 +00:00
Andrei Zmievski
3b2a83b942 Name length is already known. 2001-03-12 16:40:55 +00:00
Andi Gutmans
7db391b054 - Missed second place. 2001-03-12 16:27:26 +00:00
Andi Gutmans
123491aeac - Nuke snprintf() 2001-03-12 16:23:19 +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
Thies C. Arntzen
373e830117 fixed crash in add_index_bool. 2001-01-23 15:30:18 +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
f1a9920bcf Maintain consistency 2000-11-02 19:27:55 +00:00
Andi Gutmans
2946f87f00 - Fix new -m on Windows 2000-10-26 23:50:17 +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
Zeev Suraski
07a8327a0e Fix zend_get_parameters() 2000-06-11 16:19:31 +00:00
Zeev Suraski
a29791411b Fix bug #4768 2000-06-10 01:08:55 +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
Sascha Schumann
458352954d Add newline at the end of the file (breaks at least SCO and Tru64 C compiler). 2000-06-06 02:47:43 +00:00
Zeev Suraski
13b67621cf Fix a bug in static initializers/default values/class member variables that contained
array values
2000-05-31 19:07:09 +00:00
Zeev Suraski
bc7abb3300 Allow disabling of functions for security reasons 2000-05-29 17:16:52 +00:00
Sascha Schumann
99e2820bed Fix segfault occuring when a temporary module was unloaded and if this
module did not have a request shutdown function.
2000-05-02 07:04:59 +00:00
Zeev Suraski
dc93a62cbb Correct fix 2000-04-24 16:04:13 +00:00
Thies C. Arntzen
9786e4450a MODULE_TEMPORARY should get a call to RSHUTDOWN as well! 2000-04-24 15:49:23 +00:00
Zeev Suraski
4cb9a483d2 - Clean up resource lists namespace
- Prepare extended resource list destructor APIs (currently unused)
2000-04-15 13:02:22 +00:00
Andi Gutmans
7fd92b524d - Stop zend_func_args() and co. from crashing 2000-03-26 18:40:24 +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
6db18997bb - Nuke hash_*_ptr functions 2000-03-24 11:12:30 +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
9f51f154aa - Stop passing list/plist to internal functions
- Add a typedef for the pCopyConstructor function pointer
- Minor hacks
2000-02-05 15:11:24 +00:00
Andrei Zmievski
e0628436f3 *** empty log message *** 2000-02-03 18:51:33 +00:00
Zeev Suraski
8b9e07dace - Fix built-in classes with more than 5 methods 2000-02-02 22:23:37 +00:00
Andrei Zmievski
b995d2cc2f Added add_property_unset() and add_property_bool(). 2000-02-01 23:12:48 +00:00
Andi Gutmans
bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Zeev Suraski
f2d703e916 - Nuke undefined_variable_string
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Andi Gutmans
c34a062f5c - Get rid of warning 1999-12-27 19:17:40 +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
Andi Gutmans
27daca31f3 - Make zend_internal_function allocate a full zend_function structure so
that we don't get memory overruns and Thies doesn't get angry :)
1999-12-27 17:29:35 +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
Andrei Zmievski
80bab9d939 We're using ZVAL's now. 1999-12-21 17:14:31 +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
Sascha Schumann
70df2d7478 Fix some warnings 1999-12-05 16:23:45 +00:00
Andrei Zmievski
83ce7c13d1 *** empty log message *** 1999-12-04 18:57:44 +00:00
Andrei Zmievski
f962a35df7 Added zend_set_hash_symbol() function. 1999-12-04 16:50:18 +00:00
Andi Gutmans
3a17630121 - Applied Thies' bug fix. Great work! 1999-11-30 20:37:52 +00:00
Zeev Suraski
71b1219ee3 This request_shutdown() is no longer needed (never was needed really) 1999-11-26 20:19:28 +00:00
Zeev Suraski
94b5119898 Remove request_started, increase thread safety 1999-11-26 13:53:18 +00:00
Zeev Suraski
6358c6631b - Optimize class instanciation
- Fix constant instanciation for array elements inside objects
1999-11-21 18:11:10 +00:00
Thies C. Arntzen
6847fefad9 added add_*_resource() and add_*_bool() functions 1999-10-04 11:42:46 +00:00
Thies C. Arntzen
446e5d0fff added add_property_resource 1999-09-29 15:25:06 +00:00
Stig S. Bakken
009025e00d * header file cleanup
* fixed --enable-thread-safety build for UNIX

I don't have a Win32 environment available, could someone please try
compiling on Win32 to see if I got all the header file stuff right there?
1999-09-06 16:14:08 +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
6ec1acbe32 Phase 3:
Use a single bit to mark IS_REF variables
1999-07-09 18:19:48 +00:00
Zeev Suraski
5f62c347c7 Step 2:
Rename is_ref to EA
1999-07-09 17:44:41 +00:00
Zeev Suraski
81d901b14d Step 1 in nuking the garbage collector:
- Change the hash destructor to return int
- Don't kill the bucket on hash_destroy if the destructor returns 0
1999-07-09 17:24:47 +00:00
Zeev Suraski
95c9e3014a * Fix cases where you assign an array element to the parent array (the array was
being erased before the assignment, so the element was being smashed).
1999-06-09 21:39:12 +00:00
Zeev Suraski
9108abc287 Minor updates (mostly __declspec() stuff) 1999-06-04 11:44:02 +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
bfbe86187e Almost forgot to commit those 1999-05-09 12:24:21 +00:00
Zeev Suraski
5a5806e02a Cleanups, remove old ts code 1999-04-24 00:12:55 +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
Andi Gutmans
3fcc6511f6 * Optimize argument_stack top lookup
* Fix a nasty bug in zend_ptr_stack_clean()
1999-04-13 17:03:10 +00:00
Zeev Suraski
ad9b13eb9e off by one 1999-04-12 21:06:29 +00:00
Zeev Suraski
3ca6d6113a Make functions that don't take arguments somewhat happier:) 1999-04-12 19:44:47 +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
Zeev Suraski
9d8e0db38f * Add arguments to shutdown functions
* Remove traces of php_ini stuff
1999-04-08 21:14:50 +00:00
Andi Gutmans
573b46022c Zend Library 1999-04-07 18:10:10 +00:00