diff options
author | Andrei Zmievski <andrei@php.net> | 2003-03-31 20:42:01 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 2003-03-31 20:42:01 +0000 |
commit | 5657b8369119dab9c81deb036d7a43c83df332cb (patch) | |
tree | 74f0557311da249690b7b2efdc08512cdcc03d5d /Zend/zend_opcode.c | |
parent | 383808e9d3e17d2ca2cb513d5d7d6b1dd9681c12 (diff) | |
download | php-git-5657b8369119dab9c81deb036d7a43c83df332cb.tar.gz |
Multi-purpose patch:
- The fields of zend_namespace were not completely initialized which
led to a variety of problems.
- The occurrence of class/interface/namespace definition is now
captured.
- Functions/classes/interfaces/namespaces can be preceded by doc
comments which are stored for use by extensions.
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r-- | Zend/zend_opcode.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 11e6c9c4b4..31ddb4557e 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -74,6 +74,8 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz op_array->function_name = NULL; op_array->filename = zend_get_compiled_filename(TSRMLS_C); + op_array->doc_comment = NULL; + op_array->doc_comment_len = 0; op_array->arg_types = NULL; @@ -157,6 +159,9 @@ ZEND_API void destroy_zend_class(zend_class_entry **pce) if (ce->num_interfaces > 0) { efree(ce->interfaces); } + if (ce->doc_comment) { + efree(ce->doc_comment); + } efree(ce); break; case ZEND_INTERNAL_CLASS: @@ -184,6 +189,9 @@ ZEND_API void destroy_zend_namespace(zend_namespace **pns) zend_hash_destroy(&ns->constants_table); zend_hash_destroy(ns->static_members); FREE_HASHTABLE(ns->static_members); + if (ns->doc_comment) { + efree(ns->doc_comment); + } efree(ns->name); efree(ns); } @@ -229,6 +237,9 @@ ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC) if (op_array->function_name) { efree(op_array->function_name); } + if (op_array->doc_comment) { + efree(op_array->doc_comment); + } if (op_array->arg_types) { efree(op_array->arg_types); } |