Commit Graph

139 Commits

Author SHA1 Message Date
Marcus Boerger
e20f534ee5 Simplify 2003-12-27 20:33:14 +00:00
Marcus Boerger
9702c70a35 Synch/Unify error messages related to function/method calls 2003-09-02 14:08:59 +00:00
Marcus Boerger
d4aa155d25 Precise destructor errors 2003-08-09 14:32:33 +00:00
Stanislav Malyshev
9fa2d52310 make clone and throw coexist peacefully 2003-07-27 13:20:31 +00:00
Marcus Boerger
7cdc2d1f39 Shuffle code to ease writing clone handlers 2003-07-19 09:47:00 +00:00
Marcus Boerger
5b54322dc7 Temporairy solution to overcome shutdown propbelms with objects that have
hidden destructors.
#
# If we set the error level to E_ERROR what we must to to be correct and an
# object needs to be automatically destructed in shutdown process then the
# exit would cause memory corruption and a SEGV.
2003-07-02 23:58:47 +00:00
Marcus Boerger
669016c724 Reorganize this a bit to ensure the object memory is destructed before
showing the error.
2003-07-02 23:53:53 +00:00
Marcus Boerger
74a0f6c8ab Finally fix property cloning and fix the tests accordingly.
# The default behaviour is to copy all properties with all current values
# from the old object. But if __clone is overwritten then only the default
# properties are cloned with their correct default values. So we keep
# the type system intact and also allow real __clone overwriting now.
2003-07-02 07:24:11 +00:00
Marcus Boerger
5500287432 Fix __clone().
# This is somewhat discussable. I copied all properties from the old to the
# new object. But for type correctness we only need to copy the properties
# declared in the class and its parents.
#
# Also someone might want to take care about static and const members.
2003-07-01 23:29:36 +00:00
Marcus Boerger
35c40932e8 Fix destructor visibility 2003-07-01 19:13:50 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +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
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Harald Radi
46306a3212 export zend_objects_destroy_object()
static inline was meaningless anyways as the function
was only used as a callback handler and was never
called directly
2003-01-17 23:59:15 +00:00
Andi Gutmans
f7f9721bdb - Change the automatically created variable $clone in __clone() to
- $that as discussed at the PHP Conference. If there are any objections
- alternative names please let me know. The reason for changing it from
- $clone is because $clone sounds as if it's the newly cloned object and
- not the old one.
2002-11-05 18:16:11 +00:00
Stanislav Malyshev
d8651c82cd Support for __get, __set and __call in classes.
This should work as follows: if class hasn't member with given name,
__get/__set is called. If class has no method with given name, __call is called.
__get/__set are not recursive, __call can be.
2002-09-04 09:07:58 +00:00
Sebastian Bergmann
646292e08b Fix warning. 2002-08-08 18:50:46 +00:00
Stanislav Malyshev
11fb07a360 Add ZEND_API to functions 2002-08-08 17:53:32 +00:00
Andi Gutmans
4a52b98835 - Export zend_object_get_address() 2002-07-01 04:21:40 +00:00
Andi Gutmans
b53569c9e8 - Nuke persist_alloc(). 2002-06-22 13:52:07 +00:00
Andi Gutmans
478ed1cf82 - Fix build 2002-05-31 14:32:19 +00:00
Stanislav Malyshev
f75f3cff82 Generalize object storage and reference bookkeeping 2002-05-31 12:09:19 +00:00
Andi Gutmans
1fe8df14c6 - constructor_called is supposed to be destructor_called 2002-05-14 16:15:50 +00:00
Andi Gutmans
c84a4ead95 - Pass TSRMLS to callbacks. 2002-03-15 16:26:17 +00:00
Andi Gutmans
2505f6b400 - Fix crash reported by Sebastian when destructor function causes a fatal
- error. I hope this does it and we don't find any other problems.
2002-03-01 10:26:10 +00:00
Andi Gutmans
b04238698f - Remove object debug messages. 2002-02-08 00:22:37 +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
Andi Gutmans
e366f5dbd8 - Fix problem with the objects_destructor called during shutdown. It was
- freeing objects from id 0 instead of id 1. id 0 is not used.
- Change isset/empty opcodes to support static members and the new way of
- doing $this->foobar. Also the opcodes operate now on the hash table
- combined with the variable names so that they can be overloaded by the
- soon to be added overloading patch.
2002-02-04 19:29:56 +00:00
Andi Gutmans
7309a6ed21 - First destructor hell fix. There was a situation where an object's
- destructor could be run after its class was already dead. Right now
- object destructors is the first thing whic happens during shutdown in
- order to prevent this problem. It's very likely that destructors will
- cause more grief and we'll have to outline exactly when you should use
- them and what kind of logic you're allowed to do inside of them.
- This bug was reported by sebastian.
2002-01-25 12:55:03 +00:00
Andi Gutmans
e322abdd63 - Use two underscores for __construct(), __clone and friends... 2001-12-27 16:35:07 +00:00
Andi Gutmans
3d89072c7e - Only check refcount of object if the destructor was called. 2001-12-27 14:44:39 +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
Andi Gutmans
6435c3e962 - Remove bogus notice 2001-08-16 14:42:28 +00:00
Andi Gutmans
ea48c0c46a - Fix a bug in method calls.
- Try to get the old copying behavior of objects to work (doesn't work yet).
2001-08-16 14:04:04 +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
Andi Gutmans
1751c4eba5 - Fix UNIX build. 2001-08-11 13:23:35 +00:00
Andi Gutmans
5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +00:00