[Python-checkins] CVS: python/dist/src/Tools/bgen/bgen bgenGenerator.py,1.9,1.10

Jack Jansen jackjansen@users.sourceforge.net
2001年7月01日 15:09:26 -0700


Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen
In directory usw-pr-cvs1:/tmp/cvs-serv16408/Python/Tools/bgen/bgen
Modified Files:
	bgenGenerator.py 
Log Message:
Added WeakLink...Generator classes (should have done that ages ago). These check the c-function pointer for being NULL before calling it and raise UnimplementedError if it is.
This allows system libs to be weak-linked, thereby allowing us to generate functions that are only available on some OS versions without getting a NULL dereference if the function isn't available.
Index: bgenGenerator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenGenerator.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** bgenGenerator.py	2001年05月19日 13:59:05	1.9
--- bgenGenerator.py	2001年07月01日 22:09:24	1.10
***************
*** 165,168 ****
--- 165,169 ----
 	def functionbody(self):
 		self.declarations()
+ 		self.precheck()
 		self.getargs()
 		self.callit()
***************
*** 195,198 ****
--- 196,202 ----
 			if arg.mode in (InMode, InOutMode):
 				arg.getargsCheck()
+ 	
+ 	def precheck(self):
+ 		pass
 
 	def callit(self):

AltStyle によって変換されたページ (->オリジナル) /