Commit Graph

3223 Commits

Author SHA1 Message Date
Moriyoshi Koizumi
2f27fe3574 Add test case for bug #26010 2003-10-31 17:12:16 +00:00
4adbd1dbf6 ChangeLog update 2003-10-31 01:32:21 +00:00
Stanislav Malyshev
44c3f0066b make CATCH opcode use "class" T like other opcodes do - via IS_CONST 2003-10-30 11:11:48 +00:00
Andi Gutmans
0b3fe78906 - Beta 2 2003-10-30 10:07:26 +00:00
3a65317f79 ChangeLog update 2003-10-30 01:33:04 +00:00
Moriyoshi Koizumi
973f606067 Use pretty macro instead. 2003-10-29 17:45:56 +00:00
e05a4acc8f ChangeLog update 2003-10-29 01:32:08 +00:00
Andi Gutmans
530789987f - Head up! I'm reverting the patch which allows for expressions in constant
- declerations. Allowing the access of other constants in this code is
- flawed. We are reverting back to PHP 4's static scalars.
- Don't worry if you get the following msg when compiling:
- "zend_language_parser.y contains 3 useless nonterminals and 22 useless rules"
- I didn't nuke the code in case we have some brilliant ideas after beta 2
2003-10-28 23:44:23 +00:00
Marcus Boerger
851a02e87f Give some freedon to c iterators but not in userspace. 2003-10-28 18:46:37 +00:00
Shane Caraveo
4bde74c3be fix crash in do_implement_interface when compiling
pear/PHPUnit/Framework/TestCase.php line 63
while only interface_gets_implemented is the issue in this instance, both
these vars were unitialized, causing potential other issues
2003-10-28 05:24:46 +00:00
38f336d464 ChangeLog update 2003-10-26 00:32:26 +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
da8ce17f7a This forces a better error message for non working clone calls. 2003-10-25 19:28:31 +00:00
Marcus Boerger
cad49f1fb0 And use things to throw an exception here 2003-10-25 19:13:06 +00:00
Marcus Boerger
4625529abe You shall not clone Exception instances 2003-10-25 19:07:09 +00:00
Marcus Boerger
fe3db4c7e9 You shall not clone reflection_xx instances 2003-10-25 19:06:35 +00:00
Marcus Boerger
6c05957aa2 Update 2003-10-25 15:11:49 +00:00
Marcus Boerger
52d2f8f579 Update 2003-10-25 14:54:10 +00:00
Sebastian Bergmann
e1fd9aed8f Fugbix typo. 2003-10-25 09:20:47 +00:00
Sebastian Bergmann
8bb30308f8 s/Throwable/Printable: Exception has become an internal class since I initially documented interfaces. 2003-10-25 09:18:23 +00:00
a82b296aa7 ChangeLog update 2003-10-25 00:32:55 +00:00
Andi Gutmans
23c00b0d5d - Fix typo 2003-10-24 22:13:00 +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
c32c3264ae ChangeLog update 2003-10-24 00:34:04 +00:00
Sebastian Bergmann
60f7896634 Add zend_interfaces.{c|h}. 2003-10-23 04:41:09 +00:00
a6210d2d75 ChangeLog update 2003-10-23 00:33:10 +00:00
Ilia Alshanetsky
5dac0007f3 Fixed bug #25922 (Crash in error handler when 5th argument is modified). 2003-10-22 23:42:55 +00:00
Marcus Boerger
8abb3bd448 Impement userspace iterator interfaces and tests. See tests for details
on the names.
2003-10-22 20:04:48 +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
0bb59f337b The string conversion method should be named __toString() 2003-10-22 19:00:42 +00:00
5148ffdf90 ChangeLog update 2003-10-22 00:32:20 +00:00
Marcus Boerger
91099f3f4f Make this clear 2003-10-21 06:41:26 +00:00
06370c9132 ChangeLog update 2003-10-21 00:33:44 +00:00
Andi Gutmans
28957fd536 - Add comment from Timm 2003-10-20 22:02:10 +00:00
Marcus Boerger
c92b0202c7 Update 2003-10-20 10:26:03 +00:00
Marcus Boerger
445aa744e7 Update 2003-10-20 10:06:31 +00:00
634d8aa5ed ChangeLog update 2003-10-20 00:34:48 +00:00
Andi Gutmans
df033b58a0 - Nuke const in function parameters. I just can't remember why this exists
- and it seems no one else remembers either. It has no semantic meaning.
2003-10-19 08:38:48 +00:00
d9a61412c1 ChangeLog update 2003-10-19 00:32:44 +00:00
Marcus Boerger
b0b82541e8 Fix class/iterator relationship & handling 2003-10-18 18:43:31 +00:00
Marcus Boerger
15bfbc7619 Fallback to old behavior until we have a default iterator that respects
visibility we do the array trick.
2003-10-18 18:20:42 +00:00
Marcus Boerger
ac262baf19 Change order: Optional rewind() to end of structure 2003-10-18 14:56:47 +00:00
ba21b244b5 ChangeLog update 2003-10-18 00:32:33 +00:00
Marcus Boerger
65657103ad WS 2003-10-17 18:47:49 +00:00
Marcus Boerger
641a55a4dd Show if a class/object is iterateable 2003-10-17 17:51:01 +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
43a948379a Fix showing final/abstract for classes 2003-10-17 08:15:48 +00:00
Ilia Alshanetsky
a2e95e4b91 Fixed formatting issue. 2003-10-17 02:47:44 +00:00
Ilia Alshanetsky
c66bcc7b74 Fixed if() condition. 2003-10-17 02:29:06 +00:00
3a6ea5b696 ChangeLog update 2003-10-16 00:34:03 +00:00
Marcus Boerger
4073a08488 Add oo support function zend_class_implements() 2003-10-15 06:24:17 +00:00
Marcus Boerger
d148ff770f Fix cast function 2003-10-15 06:23:07 +00:00
6c317f5ad9 ChangeLog update 2003-10-15 00:34:01 +00:00
Andi Gutmans
8e2a3ec24b - Argh, the suffering copy&paste can cause 2003-10-14 18:13:55 +00:00
Andi Gutmans
a24df5cf55 - Fix compile problem. 2003-10-14 17:26:36 +00:00
Andi Gutmans
01ba151cc3 - Fix the fix by making sure the new block is in the right free list. 2003-10-14 14:44:19 +00:00
Stanislav Malyshev
6a71c1d33f The freed one is a hashtable - may matter if Hashtables are allocated
differently
2003-10-14 14:36:23 +00:00
Andi Gutmans
1a6f1e8c6a - Support merging free block which was created by reallocing to smaller
- size. This should fix some performance issues. This code is still not
- thoroughly tested.
2003-10-14 14:23:12 +00:00
22c54d7ec0 ChangeLog update 2003-10-10 00:33:53 +00:00
Zeev Suraski
2ab30d7133 Allow foo::$bar() 2003-10-09 13:44:44 +00:00
71191d67cf ChangeLog update 2003-10-08 00:33:46 +00:00
Rasmus Lerdorf
9a88c2d62c MFB bison configure test fix 2003-10-07 22:39:54 +00:00
Zeev Suraski
146ba0e875 Fix bug #17997 (Warning when switch & reference are combined) 2003-10-07 16:04:08 +00:00
Zeev Suraski
d16d25b136 Fix the fix :)
Not thoroughly tested, but appears to work fine
2003-10-07 10:05:10 +00:00
Marcus Boerger
2c2af7c7ef Bugfix #25770 Segfault with PHP and bison 1.875 2003-10-07 09:33:20 +00:00
6e97d2fff2 ChangeLog update 2003-10-06 00:33:56 +00:00
Zeev Suraski
4de32429f5 Remove unused callback 2003-10-05 08:27:31 +00:00
Zeev Suraski
3f5acc73a5 Remove redundant callback, simplify API 2003-10-05 07:52:28 +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
ddbc673eb3 ChangeLog update 2003-10-04 00:32:39 +00:00
Moriyoshi Koizumi
4859431fc1 Fixed bug #24766 (strange result array from unpack()) 2003-10-03 22:41:43 +00:00
Moriyoshi Koizumi
149f786025 Bug #25738 (alloca() related problems on the Darwin platform) 2003-10-03 22:02:55 +00:00
Moriyoshi Koizumi
be5cbf9999 Ensure lval to have a *boolean* value. 2003-10-03 16:57:41 +00:00
foobar
db50cd251e Aligned configure help texts. 2003-10-03 05:24:33 +00:00
5b17050a79 ChangeLog update 2003-10-01 00:32:39 +00:00
Moriyoshi Koizumi
ddd49b34c8 Remove redundant '\n' 2003-09-30 00:32:41 +00:00
c88a26881e ChangeLog update 2003-09-27 00:33:03 +00:00
Hartmut Holzgraefe
075e66cc08 signed/unsigned compiler warning fixes 2003-09-26 08:09:56 +00:00
22c6591674 ChangeLog update 2003-09-26 00:32:52 +00:00
Georg Richter
47f6dc77c5 fixed compiler warning
removed dead code
2003-09-25 15:54:17 +00:00
Georg Richter
664078c100 changed ulong to long to avoid compiler warnings (comparison between signed and unsigned) 2003-09-25 15:38:35 +00:00
c8db2e0455 ChangeLog update 2003-09-23 00:32:08 +00:00
Ilia Alshanetsky
10def9a8ae Added missing format. 2003-09-22 04:21:44 +00:00
b5d828f92d ChangeLog update 2003-09-21 00:32:02 +00:00
Marcus Boerger
0266efb8b5 Add public array Reflection_Class::getDefaultProperties() 2003-09-20 14:22:48 +00:00
42758e6ebd ChangeLog update 2003-09-19 00:33:52 +00:00
Marcus Boerger
3efe102a48 Nuke vars no longer needed 2003-09-18 17:13:59 +00:00
Marcus Boerger
7b3e84871e Go with studlyCaps 2003-09-18 16:20:42 +00:00
Marcus Boerger
5b3bb16530 Go with studlyCaps 2003-09-18 12:09:55 +00:00
Marcus Boerger
f8a376fe8e Change tostring() into __toString() to match method name used in casting. 2003-09-18 11:55:57 +00:00
Marcus Boerger
71ba442768 Fallback to default behaviour for unsupported object type conversions 2003-09-18 11:50:05 +00:00
Marcus Boerger
d7fdf15a41 - Allow partial type conversion support for objects.
- Add support for object to string conversion from userspace by method
  __toString() and add a test.
2003-09-18 11:38:33 +00:00
Marcus Boerger
87045df4ce Add missing check 2003-09-18 10:21:38 +00:00
77669838d0 ChangeLog update 2003-09-18 00:32:25 +00:00
Marcus Boerger
909bd62a43 Show name of missing function as typed 2003-09-17 11:06:11 +00:00
Marcus Boerger
755c404d08 Use studlyCaps in exception class 2003-09-17 10:15:00 +00:00
Marcus Boerger
46b8801b35 Go with studlyCaps in error messages/backtrace/reflection output 2003-09-17 10:14:12 +00:00
328a6b862a ChangeLog update 2003-09-17 00:31:56 +00:00
Marcus Boerger
d2088841a4 - Make it clear whether it is an interface or a class
- Fix static properties
2003-09-16 19:31:45 +00:00
596ef9704b ChangeLog update 2003-09-16 00:32:09 +00:00
Marcus Boerger
6bf04aff5b Revert - need to look for a better solution 2003-09-15 21:00:38 +00:00
Marcus Boerger
16a816b92c Bugfix #25547 2003-09-15 20:20:14 +00:00
Zeev Suraski
36133c4d0b Simplify / fix 2003-09-15 08:13:34 +00:00
def79d3754 ChangeLog update 2003-09-15 00:34:42 +00:00
Marcus Boerger
9d7f2fd9f0 Bugfix #25335 2003-09-14 19:56:37 +00:00
Zeev Suraski
e0508c13bb Commit 64-bit fixes to the standard operators
by Ard Biesheuvel (abies@php.net)
2003-09-14 17:37:01 +00:00
Marcus Boerger
1c86e53204 Bugfix #25528 (by Ard Biesheuvel) 2003-09-14 01:20:25 +00:00
576951c129 ChangeLog update 2003-09-14 00:31:51 +00:00
Marcus Boerger
dc6163fe20 Fix warnings 2003-09-13 16:49:50 +00:00
3a9e32d7dc ChangeLog update 2003-09-12 00:32:10 +00:00
Stanislav Malyshev
5bcc602a7c add test 2003-09-11 17:07:43 +00:00
Stanislav Malyshev
b163778fee ws 2003-09-11 17:06:53 +00:00
Stanislav Malyshev
406ff728f1 Use scope from method, not from object 2003-09-11 17:04:26 +00:00
Marcus Boerger
6f78de02f0 Use type instead of constant 2003-09-11 10:26:47 +00:00
d73045166b ChangeLog update 2003-09-09 00:31:42 +00:00
Marcus Boerger
9d0506ec54 Fix property inheritance where a derived class inherits a public property
and owns it as an implicit public property already (noticed by Brad).
2003-09-08 23:25:57 +00:00
Marcus Boerger
62421b5201 Fix registering/derigistering of stdClass in ZTS and NON ZTS mode 2003-09-08 10:45:19 +00:00
3cbdfccaa8 ChangeLog update 2003-09-08 00:31:45 +00:00
Marcus Boerger
cdc5d69ec2 Fix foreach() called with non array 2003-09-07 23:09:30 +00:00
Stanislav Malyshev
22c6bc13c7 check for mach-o/dyld.h - needed for non-PHP ZE build 2003-09-07 13:49:15 +00:00
573abd7e50 ChangeLog update 2003-09-07 00:31:51 +00:00
Marcus Boerger
fdf3fbadf0 Disallow to changing the backtrace 2003-09-06 14:06:40 +00:00
Marcus Boerger
a986b3f6a4 Add missing newline if no static methods are available 2003-09-06 13:18:12 +00:00
Marcus Boerger
10ea007e39 - Internal functions shall be static
- Fix more nesting
2003-09-06 13:11:27 +00:00
Marcus Boerger
35529e1964 Fix logic 2003-09-06 13:02:16 +00:00
Marcus Boerger
c31fc7771a - Fix CS: {{{ / }}}
- Fix static reflection_*::export()
- Add class reflection_object which allows to show dynamic properties
2003-09-06 12:52:40 +00:00
Marcus Boerger
f5b1114449 Use %s where it makes more sense 2003-09-06 10:59:07 +00:00
b0aff5de7d ChangeLog update 2003-09-06 00:31:23 +00:00
Marcus Boerger
79a507e4eb Simplify reflection_property::__constructor() and fix property factory 2003-09-05 14:48:55 +00:00
Marcus Boerger
9a39cd5501 - Don't use resorved words as variable names.
- Improve several exception messages.
- Fix Reflection_Property::_construct() / getDeclaringClass()
# The above does not imply that properties are fixed when returned
# by other reflection api methods.
2003-09-05 14:35:31 +00:00
Marcus Boerger
34990374e1 Fix reflection_api::__construct() (noticed by Andrey) 2003-09-05 12:14:03 +00:00
Marcus Boerger
0e3918732e Provide string casting for exceptions by calling toString() 2003-09-05 11:40:30 +00:00
79e5df27af ChangeLog update 2003-09-05 00:32:09 +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
4e7a782f3a Add reflection_class::getstaticproerties() 2003-09-04 15:57:25 +00:00
e2c873fa0c ChangeLog update 2003-09-04 00:32:10 +00:00
Marcus Boerger
be8287e55c Partly revert and reintroduce hash table entries for the ctor.
# Obviously not the brightest idea i had today.
2003-09-03 21:21:18 +00:00
Marcus Boerger
5569d7fae9 Nuke unused variable, too 2003-09-03 20:28:13 +00:00
Marcus Boerger
61b96d1fe2 - Inheritance applies to __clone() too.
- No need to add additional functions for the constructor.
  The handler uses the pointer as intended and doesn't look the the name.
2003-09-03 20:26:01 +00:00
Marcus Boerger
91ff8d67e7 Cannot turn a static property into a non static one and vice versa 2003-09-03 19:28:46 +00:00
Marcus Boerger
7bbbd5035d Fix handling of static properties initialized to arrays 2003-09-03 18:01:22 +00:00
Marcus Boerger
1d21d48e8a Add missing error messages when violating static property inheritance rules. 2003-09-03 16:34:35 +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
1d3d396fea Allow redeclareing a protected property as public.
#
# The only known thing left at this moment is that the protected static members
# of a base class is different then the redeclared public property. I tried
# to remove both new and old static properties in the derived class and copy
# the base property with the new name. But for reasons i have to check later
# that didn't result in the expected behavior. Anyway we would need a warning
# if someone tries to change the value of a static property in a derived class.
#
2003-09-03 10:58:55 +00:00
Zeev Suraski
93f0ee5fda Revert bogus patch
One must *never* use E_CORE_* error levels!
2003-09-03 08:39:43 +00:00
Marcus Boerger
2f6e25da79 Clearly distinguish between Const, Static and Other members.
# Const and static props have more in common then static and dynamic/implicit.
2003-09-03 00:38:13 +00:00
3b2a06382b ChangeLog update 2003-09-03 00:31:52 +00:00
Marcus Boerger
d1b74000ad Fix error messages 2003-09-02 23:12:37 +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
560d3ab36a Use appropriate function for property name unmangling.
# Make Andrey happy
2003-09-02 14:46:02 +00:00
Marcus Boerger
7148cb9e73 Make these static as noticed by Andrey 2003-09-02 14:11:53 +00:00
Marcus Boerger
9702c70a35 Synch/Unify error messages related to function/method calls 2003-09-02 14:08:59 +00:00
Marcus Boerger
469b746b4d Fix error level 2003-09-02 13:28:34 +00:00
Marcus Boerger
0f3374615b Currently we cannot support static ctor/dtor 2003-09-02 13:26:25 +00:00
Marcus Boerger
bd86aff005 These are implicit properties as denoted by the flag. Dynamic properties only
exist in one single object and currently reflection api is not capable of
showing those.
2003-09-02 13:12:47 +00:00
Marcus Boerger
f03801bdd6 Don't loose information if no parameters were shown.
# Noticed by Sebatian Bergmann
2003-09-01 21:40:58 +00:00
Marcus Boerger
bca0019d43 Fix initial buffer size 2003-09-01 21:14:09 +00:00
Marcus Boerger
2b19c5435e Fix class handling of invoke 2003-09-01 21:11:38 +00:00
Marcus Boerger
d7fa986db8 Show {main} and prevent showing empty stack traces 2003-09-01 20:54:48 +00:00
Marcus Boerger
0036ed9064 Clearify this 2003-09-01 20:02:47 +00:00
Marcus Boerger
bef3e13caf Add missing '}' 2003-09-01 19:47:34 +00:00
Sebastian Bergmann
07ef05adb5 Revert what I think is an accidental commit by Marcus that slipped in at revision 1.23. Declaring getMessage() as final is a PITA, so I hope it will not come to that. 2003-09-01 17:26:57 +00:00
Marcus Boerger
cbd08869f2 Add static reflector::export() and its implementations.
#
# This makes the main reflection use a lot easier.
#
2003-09-01 16:13:24 +00:00
Marcus Boerger
a389286b99 Set the params in the struct 2003-09-01 15:09:57 +00:00
Marcus Boerger
c7f1c2f74f Invalidate exception in this case too 2003-09-01 13:05:50 +00:00
Marcus Boerger
1257b407a6 WS 2003-09-01 13:04:55 +00:00
ff647c501f ChangeLog update 2003-09-01 00:31:37 +00:00
Marcus Boerger
4506d4ea24 Don't repeat first const count(consts) time 2003-08-31 15:47:48 +00:00
Marcus Boerger
660c14e74a Beautify output 2003-08-31 15:30:13 +00:00
Marcus Boerger
4af0621036 Add reflection_parameters, patch by Timm Friebe 2003-08-31 15:06:54 +00:00
Marcus Boerger
f9ee319152 Excluded chars < 32 when displaying string parameters that would obliterate output. 2003-08-31 12:40:29 +00:00
Zeev Suraski
f1b80b9210 Attempt at fixing the linkage problem in Win32 2003-08-31 12:38:50 +00:00
Marcus Boerger
fb4a63a07d Synch error message with other one to fix tests 2003-08-31 11:38:31 +00:00
Marcus Boerger
8376b7eff7 Check whether we may access tat union 2003-08-31 11:21:30 +00:00
Marcus Boerger
d15ad4609d Revisited: Replace the non portable code by spprintf 2003-08-31 10:52:23 +00:00
Marcus Boerger
ade319ac54 Using zend_spprintf should be faster here 2003-08-31 10:06:13 +00:00
Marcus Boerger
d45fd8a1b1 Make vspprintf available as zend utility function. Use it in exception output. 2003-08-31 09:35:54 +00:00
c9a69abe25 ChangeLog update 2003-08-31 00:31:46 +00:00
Marcus Boerger
00fddc9b83 Actually fetch the parameter 2003-08-30 23:55:04 +00:00
Marcus Boerger
f1c92fa4c5 - Calling abstract methods should be a error for consistency reason.
- So in reflection_api we use the reflection_exception again.
2003-08-30 23:51:42 +00:00
Marcus Boerger
80c0cdf7f7 Even though it is ignored this should be correct 2003-08-30 19:01:10 +00:00
Marcus Boerger
655f2dc572 Add frame numer and finally display stack trace in the message.
#
# And voila - nice useable and helpfull exceptions in PHP.
# Now we need to tell ppl 'anyway don't use them if possible'.
#
2003-08-30 18:58:40 +00:00
Marcus Boerger
c80eb4573f Add exception::traceAsString() and exception::toString() 2003-08-30 18:28:24 +00:00
Marcus Boerger
6c69b28790 fci.function_table & fci.function_name are not needed since we use zend_fcall_info_cache 2003-08-30 13:47:27 +00:00
Marcus Boerger
e679504861 Be precise 2003-08-30 13:38:23 +00:00
Marcus Boerger
49a538d054 Actually using fcc would be a good idea 2003-08-30 12:58:35 +00:00
Marcus Boerger
f7f49e4584 - The compiler can't detect all abstract function calls so we need to check.
# In this case throwing a dedicated exception is better than the error we
# show when the compiler can detect the abstract call because its run-time.
2003-08-30 11:40:37 +00:00
Marcus Boerger
ad31a021bc Make those final (see comment) 2003-08-30 11:33:41 +00:00
707accd337 ChangeLog update 2003-08-30 00:31:40 +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
50040c8ae9 - Use zend_fcall_info_cache in invoke() to improve speed.
# This also fixes the problem with calling static methods.
2003-08-29 21:46:12 +00:00
Zeev Suraski
aaa1cdca31 Fix a problem in implicit public properties and inheritance 2003-08-29 08:51:43 +00:00
Sascha Schumann
dcfb7638bc improve a number of zend_debug format strings 2003-08-29 07:34:37 +00:00
a92363f694 ChangeLog update 2003-08-29 00:31:41 +00:00
Marcus Boerger
bdd2d4aacf Need to tell zend_fetch_debug_backtrace() whether to skip top function or not.
# And i wondered why the trace wasn't rally accurate.
2003-08-29 00:16:00 +00:00
Marcus Boerger
b3f3ddd1b5 Add public read access to protected 2003-08-28 23:43:56 +00:00
Marcus Boerger
fa70708d15 Add zend_throw_exception_ex() which allows to format exception messages.
#
# Since we don't have any portable way of printing into a dynamic buffer i
# used a stack buffer of 1K (just like the error printing) and used a dynamic
# buffer in case the necessary function is available.
#
2003-08-28 22:56:41 +00:00
Marcus Boerger
12376a2270 Classe tables work this way 2003-08-28 22:53:24 +00:00
Marcus Boerger
8d3620aea8 - Split debug_backtrace() into lowlevel c function and php function wrapper
- Add trace property to default method based on new zend_fetch_debug_backtrace
# Unforunatley the handler for uncaught exception can't show this backtrace
# simply because there is currently no way to do it. If i can think of a
# solution i'll add it. Until them i am open to any ideas/help.
2003-08-28 20:35:54 +00:00
Sascha Schumann
744c68e447 older gccs don't understand attribute((format)) on function pointers 2003-08-28 17:31:31 +00:00
Sascha Schumann
83bd1f4398 ZEND_GCC_VERSION should always be defined to a number so we can use
simple comparisons all the time.
2003-08-28 17:04:16 +00:00
Sascha Schumann
2e36578cfd Add format attribute to a number of functions
Kill a few warnings
2003-08-28 16:41:20 +00:00
Sascha Schumann
169d43e5fa cleanup & centralize ZEND_GCC_VERSION and ZEND_ATTRIBUTE_MALLOC so that
they can be used by downstream applications
2003-08-28 14:53:02 +00:00
Sascha Schumann
f065aba3ba Enable attribute((malloc)) for GCC 2.96 2003-08-28 11:55:39 +00:00
Sascha Schumann
6d7e56a0c8 GCC 2 does not know about malloc yet. 2003-08-28 06:17:05 +00:00
Sascha Schumann
cf1f6e3c4c provide attribute((malloc)) where appropiate 2003-08-28 05:50:15 +00:00
8a00475722 ChangeLog update 2003-08-28 00:32:00 +00:00
Marcus Boerger
43836e97c5 Nuke unused variable
# I should have taken Timm's patch
2003-08-27 20:48:41 +00:00
Marcus Boerger
7f5196953c Fix reflection_class::newInstance() 2003-08-27 20:45:34 +00:00
e01eddf01d ChangeLog update 2003-08-26 00:32:02 +00:00
foobar
28447d62da - Fixed bug #25240 (spaces before pre-processor directives) 2003-08-25 23:24:29 +00:00
15592ba096 ChangeLog update 2003-08-25 00:32:07 +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
Marcus Boerger
cec053f707 Don't identify alias'ed functions 2003-08-24 16:35:58 +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
Zeev Suraski
a9107e2be1 Use pemalloc() 2003-08-24 16:17:45 +00:00
Marcus Boerger
b84e9db3b8 Allow NULL, too 2003-08-24 16:13:23 +00:00
Zeev Suraski
0ac5bbd780 Never, ever, overwrite the refcount element of a connected zval! 2003-08-24 15:59:19 +00:00
Marcus Boerger
e44d0f526c Add dedicated reflection_exception 2003-08-24 15:07:54 +00:00
Marcus Boerger
4e5e7502b8 Allow to throw instances of classes derived from exception 2003-08-24 15:07:00 +00:00
Marcus Boerger
d3473d1f58 - Provide a unified way to display uncaught exceptions, which shows
file/line/message info if possible.
- Add zend_eval_string_ex() to be able to handle exceptions in eval'd code.
- Use above function to fix memleaks in CLI.
2003-08-24 13:10:03 +00:00
Marcus Boerger
669603f69d Make invoke() work 2003-08-24 12:07:13 +00:00
Marcus Boerger
96d4ac7a3f zend_parse_parameters 'O' works the way we need here 2003-08-24 11:34:01 +00:00
Marcus Boerger
418a7f980c Not needed 2003-08-24 11:28:53 +00:00
Marcus Boerger
d4cf96c524 Make use method macros 2003-08-24 11:25:08 +00:00
Marcus Boerger
eef1b7b1e8 One of PPP is needed, too 2003-08-24 11:24:10 +00:00
Marcus Boerger
bd07968bef - Add Reflection_Function::isAlias
- Use ZEND_ME/ZEND_METHOD
- Fix static entries
2003-08-24 11:11:55 +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
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
b8799ff085 ChangeLog update 2003-08-24 00:32:03 +00:00
Marcus Boerger
c3d60fd7ff Allow zend_throw_exception() to also set the exception code 2003-08-23 19:48:52 +00:00
Marcus Boerger
96fa63d6bf Exception has 4 protected default properties (message,code,file,line).
They are all initialized at c-level constructor correctly.
2003-08-23 19:41:22 +00:00
Marcus Boerger
baaa4c903d Internal classes can now have default properties. 2003-08-23 19:37:39 +00:00
Marcus Boerger
5e77dc44dc Show ctor/dtor information and those don't return anything 2003-08-23 15:47:23 +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
43334207ab Make exception code more robust 2003-08-23 14:22:28 +00:00
d696f1267a ChangeLog update 2003-08-23 00:31:15 +00:00
Ilia Alshanetsky
f94b536bc8 Replace *magic number* with a much nicer define. 2003-08-22 18:50:12 +00:00
Ilia Alshanetsky
c29e30d3af Set 2147483647 as the module number of user defined constants
Fixed a few bugs and cleaned up get_defined_constants().
2003-08-22 02:08:10 +00:00
d963f8fea3 ChangeLog update 2003-08-22 00:31:48 +00:00
Marcus Boerger
0e32aaa8c6 Add function 'zend_throw_exception(char *message, int duplicate TSRMLS_DC);'
to provide an easy way to throw exceptions for extension developers.
2003-08-21 23:32:13 +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
a060bc75c7 ChangeLog update 2003-08-21 00:31:53 +00:00
Zeev Suraski
1e70f45112 adhere to silence 2003-08-20 23:27:04 +00:00
Marcus Boerger
56e8757d77 Fix counting number of leaks 2003-08-20 22:15:01 +00:00