]> granicus.if.org Git - php/commitdiff
Hear hear, interactive mode is finally showing some progress:
authorZeev Suraski <zeev@php.net>
Sun, 6 May 2001 15:00:58 +0000 (15:00 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 6 May 2001 15:00:58 +0000 (15:00 +0000)
- Support function calls
- Fix crash bug

Zend/zend_compile.c
Zend/zend_execute_API.c

index 439d0f34d43cdae6f9ac27e8847bdd96a01e093f..c3a74bc12a18b08cfd2f1e784c185235d1ae0115 100644 (file)
@@ -762,6 +762,10 @@ void zend_do_end_function_declaration(znode *function_token CLS_DC)
        zend_do_extended_info(CLS_C);
        zend_do_return(NULL, 0 CLS_CC);
        pass_two(CG(active_op_array));
+#if SUPPORT_INTERACTIVE
+       CG(active_op_array)->start_op_number = 0;
+       CG(active_op_array)->end_op_number = CG(active_op_array)->last;
+#endif
        CG(active_op_array) = function_token->u.op_array;
 
        /* Pop the switch and foreach seperators */
index 1757d8bfb14caeb59f27702802ecca0d44f9626e..ecc0846f85a5dbcbabd667cb46dfa0e72ccb1a26 100644 (file)
@@ -568,7 +568,7 @@ void execute_new_code(CLS_D)
        }
 
     opline=CG(active_op_array)->opcodes + CG(active_op_array)->start_op_number;
-       end=opline+CG(active_op_array)->last;
+       end=CG(active_op_array)->opcodes+CG(active_op_array)->last;
 
     while (opline<end) {
         if (opline->op1.op_type==IS_CONST) {