Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Add fn_flag ZEND_ACC_ALIAS

- Unify way of function_entry generation by new macro ZEND_FENTRY
  • Loading branch information...
commit 1c2512ddea62a6bd8a38507c1e861bb7e57556b3 1 parent 3605be8
Marcus Boerger authored
Showing with 10 additions and 6 deletions.
  1. +7 −5 Zend/zend_API.h
  2. +3 −1 Zend/zend_compile.h
View
12 Zend/zend_API.h
@@ -46,11 +46,13 @@ typedef struct _zend_function_entry {
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(ZEND_FN(classname##_##name))
-#define ZEND_NAMED_FE(zend_name, name, arg_info) { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), 0 },
-#define ZEND_FE(name, arg_info) ZEND_NAMED_FE(name, ZEND_FN(name), arg_info)
-#define ZEND_FALIAS(name, alias, arg_info) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_info)
-#define ZEND_ME(classname, name, arg_info, flags) { #name, ZEND_FN(classname##_##name), arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
-#define ZEND_ABSTRACT_ME(classname, name, arg_info) { #name, NULL, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT },
+#define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
+
+#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0)
+#define ZEND_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
+#define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_ALIAS)
+#define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_FN(classname##_##name), arg_info, flags)
+#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
#define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, pass_by_ref },
#define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, pass_by_ref },
View
4 Zend/zend_compile.h
@@ -111,7 +111,9 @@ typedef struct _zend_brk_cont_element {
#define ZEND_ACC_IMPLICIT_PUBLIC 0x1000
#define ZEND_ACC_CTOR 0x2000
-#define ZEND_ACC_DTOR 0x4000
+#define ZEND_ACC_DTOR 0x4000
+
+#define ZEND_ACC_ALIAS 0x8000
char *zend_visibility_string(zend_uint fn_flags);
Please sign in to comment.
Something went wrong with that request. Please try again.