return; \
} \
-#define METHOD_NOTSTATIC_NUMPARAMS(ce, c) METHOD_NOTSTATIC(ce) \
- if (ZEND_NUM_ARGS() > c) { \
+#define METHOD_NOPARAMS() \
+ if (ZEND_NUM_ARGS() > 0) { \
ZEND_WRONG_PARAM_COUNT(); \
} \
reflection_object *intern;
zend_function *mptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(mptr);
RETURN_BOOL(mptr->common.fn_flags & mask);
}
zend_function *fptr;
string str;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
string_init(&str);
_function_string(&str, fptr, intern->ce, "" TSRMLS_CC);
Returns this function's name */
ZEND_METHOD(reflection, function_getName)
{
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
_default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
}
/* }}} */
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION);
}
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
RETURN_BOOL(fptr->type == ZEND_USER_FUNCTION);
}
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
if (fptr->type == ZEND_USER_FUNCTION) {
RETURN_STRING(fptr->op_array.filename, 1);
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
if (fptr->type == ZEND_USER_FUNCTION) {
RETURN_LONG(fptr->op_array.line_start);
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
if (fptr->type == ZEND_USER_FUNCTION) {
RETURN_LONG(fptr->op_array.line_end);
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) {
RETURN_STRINGL(fptr->op_array.doc_comment, fptr->op_array.doc_comment_len, 1);
reflection_object *intern;
zend_function *fptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(fptr);
/* Return an empty array in case no static variables exist */
parameter_reference *param;
string str;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
string_init(&str);
_parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, "" TSRMLS_CC);
Returns this parameters's name */
ZEND_METHOD(reflection_parameter, getName)
{
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
_default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
}
/* }}} */
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
if (!param->fptr->common.scope) {
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
if (param->fptr->common.scope) {
parameter_reference *param;
zend_class_entry **pce, *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
if (param->arg_info->class_name) {
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
RETVAL_BOOL(param->arg_info->array_type_hint);
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
RETVAL_BOOL(param->arg_info->allow_null);
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
RETVAL_BOOL(param->arg_info->pass_by_reference);
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
RETVAL_LONG(param->offset);
reflection_object *intern;
parameter_reference *param;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
RETVAL_BOOL(param->offset >= param->required);
parameter_reference *param;
zend_op *precv;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
if (param->fptr->type != ZEND_USER_FUNCTION)
parameter_reference *param;
zend_op *precv;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(param);
if (param->fptr->type != ZEND_USER_FUNCTION)
zend_function *mptr;
string str;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(mptr);
string_init(&str);
_function_string(&str, mptr, intern->ce, "" TSRMLS_CC);
reflection_object *intern;
zend_function *mptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(mptr);
/* we need to check if the ctor is the ctor of the class level we we
* looking at since we might be looking at an inherited old style ctor
reflection_object *intern;
zend_function *mptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(mptr);
RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR);
}
reflection_object *intern;
zend_function *mptr;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(mptr);
RETURN_LONG(mptr->common.fn_flags);
HashPosition pos;
zval **value;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
zend_update_class_constants(ce TSRMLS_CC);
int count, i;
HashTable *ht_list[3];
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
array_init(return_value);
zend_class_entry *ce;
string str;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
string_init(&str);
_class_string(&str, ce, intern->obj, "" TSRMLS_CC);
Returns the class' name */
ZEND_METHOD(reflection_class, getName)
{
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
_default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
}
/* }}} */
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
RETURN_BOOL(ce->type == ZEND_INTERNAL_CLASS);
}
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
RETURN_BOOL(ce->type == ZEND_USER_CLASS);
}
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->type == ZEND_USER_CLASS) {
RETURN_STRING(ce->filename, 1);
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->type == ZEND_USER_FUNCTION) {
RETURN_LONG(ce->line_start);
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->type == ZEND_USER_CLASS) {
RETURN_LONG(ce->line_end);
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->type == ZEND_USER_CLASS && ce->doc_comment) {
RETURN_STRINGL(ce->doc_comment, ce->doc_comment_len, 1);
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->constructor) {
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
array_init(return_value);
zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
RETVAL_BOOL(ce->ce_flags & mask);
}
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->ce_flags & (ZEND_ACC_INTERFACE | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS | ZEND_ACC_IMPLICIT_ABSTRACT_CLASS)) {
RETURN_FALSE;
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
RETURN_LONG(ce->ce_flags);
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
/* Return an empty array if this class implements no interfaces */
zend_class_entry *ce;
zend_uint i;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
/* Return an empty array if this class implements no interfaces */
reflection_object *intern;
zend_class_entry *ce;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->parent) {
property_reference *ref;
string str;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ref);
string_init(&str);
_property_string(&str, &ref->prop, NULL, "" TSRMLS_CC);
Returns the class' name */
ZEND_METHOD(reflection_property, getName)
{
- METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+ METHOD_NOPARAMS();
_default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
}
/* }}} */
reflection_object *intern;
property_reference *ref;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ref);
RETURN_BOOL(ref->prop.flags & mask);
}
reflection_object *intern;
property_reference *ref;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ref);
RETURN_LONG(ref->prop.flags);
char *prop_name, *class_name;
int prop_name_len;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ref);
if (zend_unmangle_property_name(ref->prop.name, ref->prop.name_length, &class_name, &prop_name) != SUCCESS) {
reflection_object *intern;
property_reference *ref;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(ref);
if (ref->prop.doc_comment) {
RETURN_STRINGL(ref->prop.doc_comment, ref->prop.doc_comment_len, 1);
zend_module_entry *module;
string str;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
string_init(&str);
_extension_string(&str, module, "" TSRMLS_CC);
Returns this extension's name */
ZEND_METHOD(reflection_extension, getName)
{
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
_default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
}
/* }}} */
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
/* An extension does not necessarily have a version number */
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
array_init(return_value);
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
array_init(return_value);
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
array_init(return_value);
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
array_init(return_value);
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
array_init(return_value);
zend_module_entry *module;
zend_module_dep *dep;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
array_init(return_value);
reflection_object *intern;
zend_module_entry *module;
- METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+ METHOD_NOPARAMS();
GET_REFLECTION_OBJECT_PTR(module);
php_info_print_module(module TSRMLS_CC);