rev 365 - in trunk: include/prothon src

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

Modified:
   trunk/include/prothon/prothon.h
   trunk/src/builtins-core.c
   trunk/src/builtins-dict.c
   trunk/src/builtins-int.c
   trunk/src/builtins-string.c
   trunk/src/builtins-tuple.c
   trunk/src/parser_routines.c
   trunk/src/symbol.c
Log:
replaced __gen__ with __iter__ everywhere

Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/include/prothon/prothon.h	2004-04-16 02:18:20 UTC (rev 365)
@@ -375,7 +375,7 @@
 	__BOOL__QUES,	
 	__GETCMP__,
 	__CMPVALOBJ__,
-	__GEN__,
+	__ITER__,
 	__DOC__,
 	__HASH__,
 	__FPARAMS__,

Modified: trunk/src/builtins-core.c
===================================================================
--- trunk/src/builtins-core.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/builtins-core.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -462,7 +462,7 @@
 	MODULE_SET_DOC(Gen, "generator object prototype");
 }
 
-DEF(Gen, __gen__, NULL) {
+DEF(Gen, __iter__, NULL) {
 	return self; 
 }
 
@@ -708,7 +708,7 @@
 	MODULE_ADD_SYM(Exception, __init__);
 
 	MODULE_SUB_INIT(Gen);
-	MODULE_ADD_SYM(Gen, __gen__);
+	MODULE_ADD_SYM(Gen, __iter__);
 
 	MODULE_SUB_INIT(Func);
 	MODULE_ADD_SYM(Func, __cDataLen__);

Modified: trunk/src/builtins-dict.c
===================================================================
--- trunk/src/builtins-dict.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/builtins-dict.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -435,7 +435,7 @@
 	return dict_keys_values(ist, self, 4 /*tuple*/);
 }
 
-DEF(Dict, __gen__, NULL) {
+DEF(Dict, __iter__, NULL) {
 	obj_p list_obj, gen_obj = new_object(ist, DictGen_OBJ);
 
 	gen_obj->data_type = DATA_TYPE_DATAPTR;
@@ -487,7 +487,7 @@
 	MODULE_ADD_SYM(Dict, __getItem__);
 	MODULE_ADD_SYM(Dict, __setItem__);
 	MODULE_ADD_SYM(Dict, __delItem__);
-	MODULE_ADD_SYM(Dict, __gen__);
+	MODULE_ADD_SYM(Dict, __iter__);
 	MODULE_ADD_SYM(Dict, __objList__);
 	MODULE_ADD_SYM(Dict, __cDataLen__);
 

Modified: trunk/src/builtins-int.c
===================================================================
--- trunk/src/builtins-int.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/builtins-int.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -306,7 +306,7 @@
 	return new_string_obj(ist, str);
 }
 
-DEF(Int, __gen__, NULL) {
+DEF(Int, __iter__, NULL) {
 	obj_p gen_obj = new_int_obj(ist, 0);
 	gen_obj->immutable = FALSE;
 	gen_obj->attr_proto.proto = IntGen_OBJ;
@@ -375,7 +375,7 @@
 	MODULE_ADD_SYM(Int, __or__);
 	MODULE_ADD_SYM(Int, __rShift__);
 	MODULE_ADD_SYM(Int, __lShift__);
-	MODULE_ADD_SYM(Int, __gen__);
+	MODULE_ADD_SYM(Int, __iter__);
 
 	MODULE_SUB_INIT(IntGen);
 	MODULE_ADD_SYM(IntGen, next);

Modified: trunk/src/builtins-string.c
===================================================================
--- trunk/src/builtins-string.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/builtins-string.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -277,7 +277,7 @@
 	return res;
 }
 
-DEF(String, __gen__, NULL) {
+DEF(String, __iter__, NULL) {
 	obj_p gen_obj = new_object(ist, StringGen_OBJ);
 	gen_obj->data_type = DATA_TYPE_DATAPTR;
 	gen_obj->data.ptr = strch(self);
@@ -412,7 +412,7 @@
 	MODULE_ADD_SYM(String, __add__);
 	MODULE_ADD_SYM(String, __mul__);
 	MODULE_ADD_SYM(String, __mod__);
-	MODULE_ADD_SYM(String, __gen__);
+	MODULE_ADD_SYM(String, __iter__);
 	MODULE_ADD_SYM(String, join);
 	MODULE_ADD_SYM(String, __in__QUES);
 	MODULE_ADD_SYM(String, __notIn__QUES);

Modified: trunk/src/builtins-tuple.c
===================================================================
--- trunk/src/builtins-tuple.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/builtins-tuple.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -291,7 +291,7 @@
 	return new_int_obj(ist, list_sizeof(listsize(self)));
 }
 
-DEF(Tuple, __gen__, NULL) {
+DEF(Tuple, __iter__, NULL) {
 	obj_p list_obj, gen_obj = new_object(ist, Tgen_OBJ);
 	gen_obj->data_type = DATA_TYPE_DATAPTR;
 	gen_obj->data.ptr = list_obj = copy_list_obj(ist, self);
@@ -338,7 +338,7 @@
 	MODULE_ADD_SYM(Tuple, __mul__);
 	MODULE_ADD_SYM(Tuple, __rIn__QUES);
 	MODULE_ADD_SYM(Tuple, __rNotIn__QUES);
-	MODULE_ADD_SYM(Tuple, __gen__);
+	MODULE_ADD_SYM(Tuple, __iter__);
 	MODULE_ADD_SYM(Tuple, __setItem__);
 	MODULE_ADD_SYM(Tuple, __delItem__);
 	MODULE_ADD_SYM(Tuple, __objList__);

Modified: trunk/src/parser_routines.c
===================================================================
--- trunk/src/parser_routines.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/parser_routines.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -754,6 +754,7 @@
 	return new_clist_2(label1, label2);
 }
 code_p expr_for_lcc_to_listcomp(void* param, code_p expr, clist_p forlst, clist_p lcc) {
+
 	return debug_retrn(__LINE__, expr);
 }
 
@@ -789,7 +790,7 @@
 	add_code_to(expr, res, &k);
 	res->code_data[k  ].bytecode.opcode = OP_PUSH;
 	res->code_data[k++].bytecode.param  = 2;
-	res->code_data[k++].data = SYM(__GEN__);
+	res->code_data[k++].data = SYM(__ITER__);
 	res->code_data[k  ].bytecode.opcode = OP_CALL;
 	res->code_data[k++].bytecode.param  = 0;
 	res->code_data[k  ].bytecode.opcode = OP_TRYEXCEPT;

Modified: trunk/src/symbol.c
===================================================================
--- trunk/src/symbol.c	2004-04-16 02:08:08 UTC (rev 364)
+++ trunk/src/symbol.c	2004-04-16 02:18:20 UTC (rev 365)
@@ -119,7 +119,7 @@
 	{ "__bool__QUES",	0 }, 
 	{ "__getCmp__",		0 }, 
 	{ "__cmpvalobj__",	0 }, 
-	{ "__gen__",		0 }, 
+	{ "__iter__",		0 }, 
 	{ "__doc__",		0 }, 
 	{ "__hash__",		0 },
 	{ "__fparams__",	0 },
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.