logo       
Google Custom Search
    AddThis Social Bookmark Button

rev 147 - trunk/src: msg#00017

Subject: rev 147 - trunk/src
Author: mark
Date: 2004-03-27 01:32:17 -0500 (Sat, 27 Mar 2004)
New Revision: 147

Modified:
   trunk/src/parser_routines.c
Log:
changed the return value of functions with no return 
statement back to None
IMPORTANT: __init__ functions will need to have "return ."
 at end

Modified: trunk/src/parser_routines.c
===================================================================
--- trunk/src/parser_routines.c 2004-03-27 02:39:20 UTC (rev 146)
+++ trunk/src/parser_routines.c 2004-03-27 06:32:17 UTC (rev 147)
@@ -896,11 +896,14 @@
                if(!name && body->stack_depth)
                        res = new_code(param, 1, -1, 0, OP_RETURN);
                else {
-                       res = new_code(param, 2, 0, 1, OP_PUSH_SELF);
-                       res->code_data[1].bytecode.opcode = OP_RETURN;
+                       res = new_code(param, 3, 0, 1, OP_PUSH);
+                       res->code_data[k++].bytecode.param = 2;
+                       res->code_data[k++].data = OBJ(NONE);
+                       res->code_data[k++].bytecode.opcode = OP_RETURN;
                }
                body = append_code(param, body, res, 0);
        }
+       k=0;
        blen = sizeof(code)/sizeof(code_t) + body->len;
        if (name)
                calc_code(name, &len, &stack_depth, &max_stack_depth); 





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>