rev 147 - trunk/src

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.