rev 140 - trunk/src

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: bcollins
Date: 2004-03-26 18:32:59 -0500 (Fri, 26 Mar 2004)
New Revision: 140

Modified:
   trunk/src/builtins.c
Log:
Re-enable the __gen__ for Int objects.


Modified: trunk/src/builtins.c
===================================================================
--- trunk/src/builtins.c	2004-03-26 23:28:35 UTC (rev 139)
+++ trunk/src/builtins.c	2004-03-26 23:32:59 UTC (rev 140)
@@ -791,7 +791,7 @@
 #define is_Int(objid)		(has_proto(ist, objid, INT_OBJ))
 #define Int_value(objid)	(objid->data.i64)
 
-// static obj_p INTGEN_OBJ, SYM_LIMIT;	
+static obj_p INTGEN_OBJ, SYM_LIMIT;	
 
 DEF(INT_OBJ, __bool__, NULL) { 
 	if (Int_value(self)) return OBJ(TRUE);
@@ -990,7 +990,6 @@
 	return new_string_obj(str);
 }
 
-#if 0
 DEF (INT_OBJ, __gen__, NULL) {
 	obj_p gen_obj = new_int_obj(0);
 	gen_obj->attr_proto.proto = INTGEN_OBJ;
@@ -1016,7 +1015,6 @@
 	write_unlock(ist, self); read_lock(ist, self); 
 	return res;
 }
-#endif
 
 DEF(INT_OBJ, chr, NULL){
 	char s[1];
@@ -1103,6 +1101,9 @@
 
 	FUNC_OBJ__objlist__init();
 
+	INTGEN_OBJ = new_object(NULL);
+	SYM_LIMIT = sym(ist, "limit");
+
 	INT_OBJ__str__init();
 	INT_OBJ__bool__init();
 	INT_OBJ__hash__init();
@@ -1125,4 +1126,6 @@
 	INT_OBJ__lshift__init();
 	INT_OBJ__rshift__init();
 	INT_OBJchrinit();
+	INT_OBJ__gen__init();
+	INTGEN_OBJnextinit();
 }
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.