[Python-checkins] CVS: python/dist/src/Tools/bgen/bgen bgenGenerator.py,1.10,1.11 bgenGeneratorGroup.py,1.5,1.6 bgenModule.py,1.8,1.9 bgenObjectDefinition.py,1.11,1.12 bgenOutput.py,1.2,1.3

Jack Jansen jackjansen@users.sourceforge.net
Mon, 27 Aug 2001 07:30:58 -0700


Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen
In directory usw-pr-cvs1:/tmp/cvs-serv27501

Modified Files:
	bgenGenerator.py bgenGeneratorGroup.py bgenModule.py 
	bgenObjectDefinition.py bgenOutput.py 
Log Message:
Fixes by Thomas Heller:
- make the selftests work again (they were apparently not used since
  very early in bgen's development), with some minor cleanup by me
- make emacs python mode happier


Index: bgenGenerator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenGenerator.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** bgenGenerator.py	2001/07/01 22:09:24	1.10
--- bgenGenerator.py	2001/08/27 14:30:55	1.11
***************
*** 260,269 ****
  def _test():
  	void = None
! 	eggs = Generator(void, "eggs",
! 	                 Variable(stringptr, 'cmd'),
! 	                 Variable(int, 'x'),
! 	                 Variable(double, 'y', InOutMode),
! 	                 Variable(int, 'status', ErrorMode),
! 	                )
  	eggs.setprefix("spam")
  	print "/* START */"
--- 260,269 ----
  def _test():
  	void = None
! 	eggs = FunctionGenerator(void, "eggs",
! 				 (stringptr, 'cmd', InMode),
! 				 (int, 'x', InMode),
! 				 (double, 'y', InOutMode),
! 				 (int, 'status', ErrorMode),
! 				 )
  	eggs.setprefix("spam")
  	print "/* START */"

Index: bgenGeneratorGroup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenGeneratorGroup.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** bgenGeneratorGroup.py	2000/12/12 22:24:35	1.5
--- bgenGeneratorGroup.py	2001/08/27 14:30:55	1.6
***************
*** 29,35 ****
  
  def _test():
! 	from bgenGenerator import Generator
  	group = GeneratorGroup("spam")
! 	eggs = Generator(void, "eggs")
  	group.add(eggs)
  	print "/* START */"
--- 29,36 ----
  
  def _test():
! 	void = None
! 	from bgenGenerator import FunctionGenerator
  	group = GeneratorGroup("spam")
! 	eggs = FunctionGenerator(void, "eggs")
  	group.add(eggs)
  	print "/* START */"

Index: bgenModule.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenModule.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** bgenModule.py	2001/05/19 13:59:11	1.8
--- bgenModule.py	2001/08/27 14:30:55	1.9
***************
*** 79,85 ****
  
  def _test():
! 	from bgenGenerator import Generator
  	m = Module("spam", "", "#include <stdio.h>")
! 	g = Generator(None, "bacon")
  	m.add(g)
  	m.generate()
--- 79,85 ----
  
  def _test():
! 	from bgenGenerator import FunctionGenerator
  	m = Module("spam", "", "#include <stdio.h>")
! 	g = FunctionGenerator(None, "bacon")
  	m.add(g)
  	m.generate()

Index: bgenObjectDefinition.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenObjectDefinition.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** bgenObjectDefinition.py	2001/06/28 22:07:30	1.11
--- bgenObjectDefinition.py	2001/08/27 14:30:55	1.12
***************
*** 190,194 ****
  			self.name, self.typename);
  		IndentLevel()
! 		Output("""Py_FatalError("can't initialize %sType");""",
  		                                           self.name)
  		DedentLevel()
--- 190,194 ----
  			self.name, self.typename);
  		IndentLevel()
! 		Output("""Py_FatalError("can\'t initialize %sType");""",
  		                                           self.name)
  		DedentLevel()

Index: bgenOutput.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenOutput.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bgenOutput.py	1995/01/25 22:59:16	1.2
--- bgenOutput.py	2001/08/27 14:30:55	1.3
***************
*** 44,48 ****
  
  def GetLevel():
! 	""""Return the current indentation level."""
  	return _Level
  
--- 44,48 ----
  
  def GetLevel():
! 	"""Return the current indentation level."""
  	return _Level