]> granicus.if.org Git - php/commitdiff
Add some comments
authorMarcus Boerger <helly@php.net>
Fri, 27 Feb 2004 18:20:53 +0000 (18:20 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 27 Feb 2004 18:20:53 +0000 (18:20 +0000)
Zend/zend_API.c
Zend/zend_compile.h

index a56c0c67abb67a16e6a76b446b10874f18f06f15..7e0f6f840d8ed88fe66f222315009879a38406d7 100644 (file)
@@ -1247,8 +1247,11 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
                }
                if (ptr->flags & ZEND_ACC_ABSTRACT) {
                        if (scope) {
+                               /* This is a class that must be abstract itself. Here we set the check info. */
                                scope->ce_flags |= ZEND_ACC_ABSTRACT;
                                if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
+                                       /* Since the class is not an interface it needs to be declared as a abstract class. */
+                                       /* This time we set the flag for the keyword 'abstratc'. */
                                        scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS;
                                }
                        }
index 472209034aef88ad4742a062bbe70e23214be890..25603b845df8f5f8b894102f2e9b965346836dce 100644 (file)
@@ -103,6 +103,8 @@ typedef struct _zend_try_catch_element {
 #define ZEND_ACC_ABSTRACT              0x02
 #define ZEND_ACC_FINAL                 0x04
 #define ZEND_ACC_INTERFACE             0x08
+/* ZEND_ACC_ABSTRACT is used for abstract classes and methods. Abstract checks work only on this flag. */
+/* ZEND_ACC_ABSTRACT_CLASS denotes that a class was explicitly defined as abstract be using the keyword. */
 #define ZEND_ACC_ABSTRACT_CLASS        0x10
 #define ZEND_ACC_FINAL_CLASS   0x20
 #define ZEND_ACC_IMPLEMENTED_ABSTRACT  0x40