rev 434 - in trunk: . include/prothon

SVN User <[email protected]> Fri, 30 Apr 2004 20:50:22 -0400
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-04-30 20:50:20 -0400 (Fri, 30 Apr 2004)
New Revision: 434

Modified:
   trunk/STATUS.txt
   trunk/include/prothon/prothon_dll.h
Log:
fixed BIN_CHK on prototypes

Modified: trunk/STATUS.txt
===================================================================
--- trunk/STATUS.txt	2004-05-01 00:22:27 UTC (rev 433)
+++ trunk/STATUS.txt	2004-05-01 00:50:20 UTC (rev 434)
@@ -1,6 +1,11 @@
 
 ----------------------- TO-DO (highest priority first) ------------------------
 
+bug - 	n = Proto (Int, String)
+		with n: Int$_init_(99)
+		   
+--- Add BIN_CHK to all types
+
 --- Auto-documenter app
 
 --- Bound methods - binding - calling

Modified: trunk/include/prothon/prothon_dll.h
===================================================================
--- trunk/include/prothon/prothon_dll.h	2004-05-01 00:22:27 UTC (rev 433)
+++ trunk/include/prothon/prothon_dll.h	2004-05-01 00:50:20 UTC (rev 434)
@@ -173,10 +173,10 @@
 static obj_p slf##func(isp ist, obj_p self, int pcnt,		\
 		       obj_p* parms, obj_p dlocals)
 
-#define BIN_CHK(slf)											\
-	if (obj_data_owner(self) != slf##_OBJ) {					\
-		raise_exception(ist, OBJ(INTERNAL_EXC),					\
-			"object has wrong binary data, expected %s", #slf);	\
+#define BIN_CHK(slf)												\
+	if (self != slf##_OBJ && obj_data_owner(self) != slf##_OBJ) {	\
+		raise_exception(ist, OBJ(INTERNAL_EXC),						\
+			"object has wrong binary data, expected %s", #slf);		\
 		return NULL; }
 
 #define MAIN_MODULE_INIT(name)									\