summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/bgen/bgen/bgenGenerator.py5
-rw-r--r--Tools/bgen/bgen/scantools.py8
2 files changed, 7 insertions, 6 deletions
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py
index 1a35c12..6213824 100644
--- a/Tools/bgen/bgen/bgenGenerator.py
+++ b/Tools/bgen/bgen/bgenGenerator.py
@@ -5,6 +5,7 @@ from bgenVariable import *
Error = "bgenGenerator.Error"
+DEBUG=0
# Strings to specify argument transfer modes in generator calls
IN = "in"
@@ -15,7 +16,7 @@ INOUT = IN_OUT = "in-out"
class BaseFunctionGenerator:
def __init__(self, name, condition=None):
- print "<--", name
+ if DEBUG: print "<--", name
self.name = name
self.prefix = name
self.objecttype = "PyObject" # Type of _self argument to function
@@ -25,7 +26,7 @@ class BaseFunctionGenerator:
self.prefix = prefix
def generate(self):
- print "-->", self.name
+ if DEBUG: print "-->", self.name
if self.condition:
Output()
Output(self.condition)
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py
index 5efa6fc..205a1ce 100644
--- a/Tools/bgen/bgen/scantools.py
+++ b/Tools/bgen/bgen/scantools.py
@@ -67,7 +67,7 @@ class Scanner:
for type in types:
modes = self.usedtypes[type].keys()
modes.sort()
- print type, string.join(modes)
+ self.report("%s %s", type, string.join(modes))
def gentypetest(self, file):
fp = open(file, "w")
@@ -89,7 +89,7 @@ if missing: raise "Missing Types"
fp.close()
def initsilent(self):
- self.silent = 0
+ self.silent = 1
def error(self, format, *args):
if self.silent >= 0:
@@ -486,7 +486,7 @@ if missing: raise "Missing Types"
return
self.report("==> %s %s <==", type, name)
if self.blacklisted(type, name):
- self.error("*** %s %s blacklisted", type, name)
+ self.report("*** %s %s blacklisted", type, name)
return
returnlist = [(type, name, 'ReturnMode')]
returnlist = self.repairarglist(name, returnlist)
@@ -496,7 +496,7 @@ if missing: raise "Missing Types"
if self.unmanageable(type, name, arglist):
##for arg in arglist:
## self.report(" %s", `arg`)
- self.error("*** %s %s unmanageable", type, name)
+ self.report("*** %s %s unmanageable", type, name)
return
self.alreadydone.append(name)
self.generate(type, name, arglist)