rev 420 - in trunk: . bin include/prothon pr src

SVN User <[email protected]> Mon, 26 Apr 2004 17:18:30 -0400
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-04-26 17:18:27 -0400 (Mon, 26 Apr 2004)
New Revision: 420

Modified:
   trunk/CHANGES.txt
   trunk/bin/rel.bat
   trunk/include/prothon/prothon.h
   trunk/pr/int.pr
   trunk/pr/modint.pr
   trunk/src/builtins-core.c
   trunk/src/src.vcproj
Log:
**** weekly build ****

Modified: trunk/CHANGES.txt
===================================================================
--- trunk/CHANGES.txt	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/CHANGES.txt	2004-04-26 21:18:27 UTC (rev 420)
@@ -1,6 +1,13 @@
 
 			----- Prothon Release History ----
 			
+Version 0.0.6 - Build 420 - 4/26/04 - Weekly Release
+	- Added Prosist object store database module
+	- setProto and addProto now work on immutable objects
+	- Added test files: int.pr, modint.pr, prosist.pr
+	- Fixed permission bug in interactive console (I=1)
+	- Fixed string.__iter__() method
+
 Version 0.0.5 - Build 387 - 4/18/04 - Weekly Release
 
 	- Changed all method names to camelCase (from wide_names)

Modified: trunk/bin/rel.bat
===================================================================
--- trunk/bin/rel.bat	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/bin/rel.bat	2004-04-26 21:18:27 UTC (rev 420)
@@ -13,7 +13,7 @@
 copy modules\DBM\release\DBM.dll 				win32release\Prothon
 copy modules\File\release\File.dll 				win32release\Prothon
 copy modules\OS\release\OS.dll 					win32release\Prothon
-rem copy modules\Prosist\release\Prosist.dll	win32release\Prothon
+copy modules\Prosist\release\Prosist.dll		win32release\Prothon
 copy modules\Re\release\Re.dll 					win32release\Prothon
 copy modules\SQLite\release\SQLite.dll 			win32release\Prothon
 
Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/include/prothon/prothon.h	2004-04-26 21:18:27 UTC (rev 420)
@@ -3,7 +3,7 @@
  *  
  * Copyright (c) 2004 Hahn Creative Applications, http://hahnca.com.
  * All rights reserved. 
- *
+ * 
  * 1. This LICENSE AGREEMENT is between Hahn Creative Applications ("HCA"),
  * and the Individual or Organization ("Licensee") accessing and otherwise
  * using Prothon software in source or binary form and its associated

Modified: trunk/pr/int.pr
===================================================================
--- trunk/pr/int.pr	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/pr/int.pr	2004-04-26 21:18:27 UTC (rev 420)
@@ -1,5 +1,11 @@
 #!/usr/bin/env prothon
 
+print
+print 'this should print'
+print '16 + 4'
+print '4'
+print
+
 INT=Int()
 with INT:
 	def .__add__(other):

Modified: trunk/pr/modint.pr
===================================================================
--- trunk/pr/modint.pr	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/pr/modint.pr	2004-04-26 21:18:27 UTC (rev 420)
@@ -1,7 +1,5 @@
 #!/usr/bin/env prothon
 
-# tested code
-
 ModInt = Object()
 with ModInt:
     .modulo = 10 #default
@@ -10,12 +8,21 @@
     def .__add__(other):
         if .modulo != other.modulo:
             raise TypeError
-        return (.val + other.val) % .modulo
+        return Mod16Int((.val + other.val) % .modulo)
+    def .__str__():
+        return .val.__str__()
         
 Mod16Int = ModInt() 
 Mod16Int.modulo = 16    
 
 i = Mod16Int(27)
 j = Mod16Int(4)
-print "sum is %02i" % (i + j)  # prints 15
+k = i+j
+m = Mod16Int(19)
 
+print
+print 'Following should print ...'
+print 'i: 27, j: 4, k: 15, m: 19, k+m: 2'
+print 'i: '+i+', j: '+j+', k: '+k+', m: '+m+', k+m: '+(k+m) 
+print
+

Modified: trunk/src/builtins-core.c
===================================================================
--- trunk/src/builtins-core.c	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/src/builtins-core.c	2004-04-26 21:18:27 UTC (rev 420)
@@ -141,8 +141,12 @@
 }
 
 DEF(Object, addProto, FORM_RPARAM) {
+	int m;
 	read_unlock(ist, self);
+	if((m = is_immutable(self)))
+		clr_immutable(self);
 	ins_proto(ist, self, parms[1], 1000);
+	if (m) set_immutable(self);
 	read_lock(ist, self);
 	return NULL;
 }

Modified: trunk/src/src.vcproj
===================================================================
--- trunk/src/src.vcproj	2004-04-26 19:53:52 UTC (rev 419)
+++ trunk/src/src.vcproj	2004-04-26 21:18:27 UTC (rev 420)
@@ -265,9 +265,6 @@
 				RelativePath="..\pr\hex.pr">
 			</File>
 			<File
-				RelativePath="..\pr\init.pr">
-			</File>
-			<File
 				RelativePath="init.pth">
 			</File>
 			<File
@@ -277,6 +274,9 @@
 				RelativePath="..\pr\meow.pr">
 			</File>
 			<File
+				RelativePath="..\pr\modint.pr">
+			</File>
+			<File
 				RelativePath="..\pr\oops.pr">
 			</File>
 			<File