rev 323 - in trunk: pr src

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-04-10 20:49:31 -0400 (Sat, 10 Apr 2004)
New Revision: 323

Removed:
   trunk/pr/init.pr
Modified:
   trunk/pr/super.pr
   trunk/src/init.pth
   trunk/src/interp.c
   trunk/src/object.c
Log:
everything on windows side is ready for a weekly release

Deleted: trunk/pr/init.pr
===================================================================
--- trunk/pr/init.pr	2004-04-11 00:24:46 UTC (rev 322)
+++ trunk/pr/init.pr	2004-04-11 00:49:31 UTC (rev 323)
@@ -1,23 +0,0 @@
-#!/usr/bin/env prothon
-
-print "Instantiating Base"
-Base = Object()
-with Base:
-	def .__init__():
-		print "__init__ of Base type:", .
-		return .
-
-print "Instantiating Derived"
-Derived = Base()
-with Derived:
-	def .__init__():
-		^__init__()
-		print "__init__ of Derived type:", .
-		return .
-
-print "Instantiating y"
-y = Derived()
-
-print "Base:", Base
-print "Derived:", Derived
-print "y:", y

Modified: trunk/pr/super.pr
===================================================================
--- trunk/pr/super.pr	2004-04-11 00:24:46 UTC (rev 322)
+++ trunk/pr/super.pr	2004-04-11 00:49:31 UTC (rev 323)
@@ -7,7 +7,7 @@
 with obj:
 	print .x   # prints 1
 	print ^x   # prints 2
-	
+
 print '\nabove should say...'
 print 1
 print 2

Modified: trunk/src/init.pth
===================================================================
--- trunk/src/init.pth	2004-04-11 00:24:46 UTC (rev 322)
+++ trunk/src/init.pth	2004-04-11 00:49:31 UTC (rev 323)
@@ -10,5 +10,5 @@
 
 # this is executed before Main1 as module PthMod1
 
-#import File, Re
+import Re,File
 
Modified: trunk/src/interp.c
===================================================================
--- trunk/src/interp.c	2004-04-11 00:24:46 UTC (rev 322)
+++ trunk/src/interp.c	2004-04-11 00:49:31 UTC (rev 323)
@@ -1416,7 +1416,9 @@
 	exec_loop(ist); if_exc_return FALSE;
 	if (dest_module){
 		if (!module_alias) module_alias = module_name;
+		su(i);
 		set_attr(ist, dest_module, module_alias, module);
+		un_su(i);
 	}
 	return TRUE;
 }

Modified: trunk/src/object.c
===================================================================
--- trunk/src/object.c	2004-04-11 00:24:46 UTC (rev 322)
+++ trunk/src/object.c	2004-04-11 00:49:31 UTC (rev 323)
@@ -918,7 +918,7 @@
         return call_func(ist, ref_self, SYM(__GETITEM__), 2, param, 0);
 	} else if (has_proto_QUES(ist, ref_key, OBJ(SUPER_PROTO))) {
 		if_exc_return NULL;
-        return get_proto_attr(ist, ref_self, ref_key->data.ptr, NULL, NULL);
+        return get_proto_attr(ist, ref_self, ref_key->data.ptr, NULL, ref_self);
 	} else {
 		raise_exception(ist, OBJ(INTERNAL_EXC), "Invalid reference type");
 		return NULL;
@@ -936,11 +936,13 @@
 		param[2]=0; param[3]=value;
         call_func(ist, ref_self, SYM(__SETITEM__), 4, param, 0);
 	} else if (has_proto_QUES(ist, ref_key, OBJ(SUPER_PROTO))) {
-		obj_p proto_list_obj, proto_obj; if_exc_return;
-		proto_list_obj = proto_list(ist, ref_self); if_exc_return;
-        get_proto_attr(ist, list_item(ist, proto_list_obj,1), ref_key->data.ptr, &proto_obj, NULL);
+		obj_p proto_obj;
+        get_proto_attr(ist, ref_self, ref_key->data.ptr, &proto_obj, ref_self);
 		if_exc_return;
-		if (!proto_obj) proto_obj = list_item(ist, proto_list_obj,1);
+		if (!proto_obj) {
+			obj_p proto_list_obj = proto_list(ist, ref_self); if_exc_return;
+			proto_obj = list_item(ist, proto_list_obj, 1);
+		}
 		set_attr(ist, proto_obj, ref_key->data.ptr, value);
 	} else {
 		raise_exception(ist, OBJ(INTERNAL_EXC), "Invalid reference type");
@@ -958,9 +960,8 @@
 		param[0]=0; param[1]=ref_key;
         call_func(ist, ref_self, SYM(__DELITEM__), 2, param, 0);
 	} else if (has_proto_QUES(ist, ref_key, OBJ(SUPER_PROTO))) {
-		obj_p proto_list_obj, proto_obj; if_exc_return;
-		proto_list_obj = proto_list(ist, ref_self); if_exc_return;
-        get_proto_attr(ist, list_item(ist, proto_list_obj,1), ref_key->data.ptr, &proto_obj, NULL);
+		obj_p proto_obj;
+        get_proto_attr(ist, ref_self, ref_key->data.ptr, &proto_obj, ref_self);
 		if_exc_return;
 		if (proto_obj) del_attr(ist, proto_obj, ref_key->data.ptr);
 	} else {
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.