summaryrefslogtreecommitdiff
path: root/Zend/zend.h
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2003-02-16 11:12:43 +0000
committerStanislav Malyshev <stas@php.net>2003-02-16 11:12:43 +0000
commita4c3b2ce807dec309812cfe72c91a597c8476113 (patch)
treedf2e8a0aa85b595abf66f0c7b476471c3749fc11 /Zend/zend.h
parent0a18a9d744afb9d97d46bad1f40c11a047bad5df (diff)
downloadphp-git-a4c3b2ce807dec309812cfe72c91a597c8476113.tar.gz
Namespace patch. Big changes:
1. Nested classes are gone. 2. New syntax for namespaces: namespace foo { class X { ... } function bar { ... } var x = 1; const ZZ = 2; } 3. Namespaced symbol access: $x = new foo::X; - etc. For now, namespaces are case insensitive, just like classes. Also, there can be no global class and namespace with the same name (to avoid ambiguities in :: resolution).
Diffstat (limited to 'Zend/zend.h')
-rw-r--r--Zend/zend.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index ac86552e0a..c031bce103 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -262,7 +262,18 @@ struct _zval_struct {
zend_uchar is_ref;
};
+struct _zend_op_array;
+/* typedef struct _zend_namespace {
+ char *name;
+ zend_uint name_length;
+ HashTable function_table;
+ HashTable class_table;
+ HashTable constants_table;
+ HashTable *global_variables;
+ struct _zend_op_array *op_array;
+} zend_namespace;
+*/
typedef struct _zend_function_entry {
char *fname;
@@ -308,6 +319,7 @@ struct _zend_class_entry {
HashTable *static_members;
HashTable constants_table;
zend_function_entry *builtin_functions;
+ struct _zend_class_entry *namespace;
union _zend_function *constructor;
union _zend_function *destructor;
@@ -316,6 +328,7 @@ struct _zend_class_entry {
union _zend_function *__set;
union _zend_function *__call;
+
/* handlers */
zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC);
@@ -327,6 +340,7 @@ struct _zend_class_entry {
#endif
};
+typedef struct _zend_class_entry zend_namespace; /* namespace is the same as class */
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);