Commit Graph

20 Commits

Author SHA1 Message Date
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
Marcus Boerger
04c90c8738 Show interfaces 2003-08-02 14:22:18 +00:00
Sebastian Bergmann
786afb48cb Fix segfault. Patch by Timm Friebe <thekid@thekid.de>. 2003-07-23 04:02:26 +00:00
George Schlossnagle
600f72f7b4 should nt here 2003-07-20 20:16:07 +00:00
Marcus Boerger
cfe2eda4f6 Fix warnings and whitespace in output 2003-07-20 19:57:02 +00:00
Marcus Boerger
23da3057b9 Add support for instances in Reflection_Class.
# Thanks to Timm for the fast patch contained reply to my help request :-)))
2003-07-20 18:58:34 +00:00
George Schlossnagle
7c7de5eb3c removed references to smart_str, replaced with private string management
function.  When snprintf is integrated into the engine, string_printf
should be altered to use that.
2003-07-20 18:45:40 +00:00
George Schlossnagle
84f5e4870e more of Timm's implementation. 2003-07-20 15:42:42 +00:00
Sebastian Bergmann
c86b4d13e6 2 * TSRMLS_FETCH() -> 1 * TSRMLS_DC 2003-07-04 10:31:41 +00:00
George Schlossnagle
96b71d7f87 ws fix 2003-07-04 03:26:37 +00:00
George Schlossnagle
edf78b2141 win build fixes (Rob Richards) 2003-07-03 14:11:31 +00:00
George Schlossnagle
6a4c48be6f can't forget Andrei 2003-07-03 14:00:17 +00:00
George Schlossnagle
3d7283b94f more of Timm's patches, and mod authors line to give credit where credit is due. 2003-07-03 05:33:23 +00:00
George Schlossnagle
c36a59cfd9 Timm Friebe's patches for code celanup and additional functions. 2003-07-01 18:41:42 +00:00
Sebastian Bergmann
fff7ef2f6c ZTS fixes. 2003-07-01 04:25:29 +00:00
George Schlossnagle
4edd9505fe more incremental changes. add anything that needs a class factory. 2003-07-01 04:10:57 +00:00
George Schlossnagle
9c26571b37 all the easy parts of Reflection_Class 2003-07-01 02:31:21 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
Sebastian Bergmann
5ee72bb478 ZTS fixes. Remove unused local variables. 2003-06-30 20:17:01 +00:00
George Schlossnagle
aa96d17022 added support for Reflection_Function, the first part of
the reflection api
2003-06-30 20:03:56 +00:00