r4880 - trunk/src/host/pye17/codegen

marek at docs.openmoko.org marek at docs.openmoko.org
Tue Dec 23 10:48:19 CET 2008


Author: marek
Date: 2008-12-23 10:48:19 +0100 (Tue, 23 Dec 2008)
New Revision: 4880

Modified:
   trunk/src/host/pye17/codegen/codegen.py
Log:
some minor cleanups

Modified: trunk/src/host/pye17/codegen/codegen.py
===================================================================
--- trunk/src/host/pye17/codegen/codegen.py	2008-12-23 09:24:23 UTC (rev 4879)
+++ trunk/src/host/pye17/codegen/codegen.py	2008-12-23 09:48:19 UTC (rev 4880)
@@ -385,15 +385,12 @@
 
         substdict['arglist'] = info.get_arglist()
 
-	substdict['cb_code'] = ""
-
 	# TODO: deal with more arguments
 	if info.piscb > 0:
 	  substdict['arglist'] = ", &" + function_obj.c_name + "_cb"
-	  substdict['cb_code'] = cb_template % {'c_name': function_obj.c_name,
-	                                        'cb_name': function_obj.c_name}
-	  template = substdict['cb_code'] + template
-          sys.stderr.write("cb_code: %s\n" % substdict['cb_code'])
+	  cb_code = cb_template % {'c_name': function_obj.c_name,
+	                           'cb_name': function_obj.c_name}
+	  template = cb_code + template
 
         substdict['codebefore'] = deprecated + (
             string.replace(info.get_codebefore(),
@@ -419,8 +416,8 @@
 	#for key,item in substdict.iteritems():
 		#sys.stderr.write("key: " + str(key) + ", item: " + str(item) + "\n")
 
-        if info.piscb > 0:
-           sys.stderr.write("template: %s\n" % (template % substdict))
+        #if info.piscb > 0:
+           #sys.stderr.write("template: %s\n" % (template % substdict))
 	   #sys.stderr.write("cb_code (again): %s\n" % substdict['cb_code'])
 	   #substdict['callback_code'] = 'balbla'
 	   #for key,item in substdict.iteritems():




More information about the commitlog mailing list