Kaydet (Commit) 11845e00 authored tarafından Jack Jansen's avatar Jack Jansen

Be a lot less verbose by default.

üst 20417bcd
...@@ -5,6 +5,7 @@ from bgenVariable import * ...@@ -5,6 +5,7 @@ from bgenVariable import *
Error = "bgenGenerator.Error" Error = "bgenGenerator.Error"
DEBUG=0
# Strings to specify argument transfer modes in generator calls # Strings to specify argument transfer modes in generator calls
IN = "in" IN = "in"
...@@ -15,7 +16,7 @@ INOUT = IN_OUT = "in-out" ...@@ -15,7 +16,7 @@ INOUT = IN_OUT = "in-out"
class BaseFunctionGenerator: class BaseFunctionGenerator:
def __init__(self, name, condition=None): def __init__(self, name, condition=None):
print "<--", name if DEBUG: print "<--", name
self.name = name self.name = name
self.prefix = name self.prefix = name
self.objecttype = "PyObject" # Type of _self argument to function self.objecttype = "PyObject" # Type of _self argument to function
...@@ -25,7 +26,7 @@ class BaseFunctionGenerator: ...@@ -25,7 +26,7 @@ class BaseFunctionGenerator:
self.prefix = prefix self.prefix = prefix
def generate(self): def generate(self):
print "-->", self.name if DEBUG: print "-->", self.name
if self.condition: if self.condition:
Output() Output()
Output(self.condition) Output(self.condition)
......
...@@ -67,7 +67,7 @@ class Scanner: ...@@ -67,7 +67,7 @@ class Scanner:
for type in types: for type in types:
modes = self.usedtypes[type].keys() modes = self.usedtypes[type].keys()
modes.sort() modes.sort()
print type, string.join(modes) self.report("%s %s", type, string.join(modes))
def gentypetest(self, file): def gentypetest(self, file):
fp = open(file, "w") fp = open(file, "w")
...@@ -89,7 +89,7 @@ if missing: raise "Missing Types" ...@@ -89,7 +89,7 @@ if missing: raise "Missing Types"
fp.close() fp.close()
def initsilent(self): def initsilent(self):
self.silent = 0 self.silent = 1
def error(self, format, *args): def error(self, format, *args):
if self.silent >= 0: if self.silent >= 0:
...@@ -486,7 +486,7 @@ if missing: raise "Missing Types" ...@@ -486,7 +486,7 @@ if missing: raise "Missing Types"
return return
self.report("==> %s %s <==", type, name) self.report("==> %s %s <==", type, name)
if self.blacklisted(type, name): if self.blacklisted(type, name):
self.error("*** %s %s blacklisted", type, name) self.report("*** %s %s blacklisted", type, name)
return return
returnlist = [(type, name, 'ReturnMode')] returnlist = [(type, name, 'ReturnMode')]
returnlist = self.repairarglist(name, returnlist) returnlist = self.repairarglist(name, returnlist)
...@@ -496,7 +496,7 @@ if missing: raise "Missing Types" ...@@ -496,7 +496,7 @@ if missing: raise "Missing Types"
if self.unmanageable(type, name, arglist): if self.unmanageable(type, name, arglist):
##for arg in arglist: ##for arg in arglist:
## self.report(" %s", `arg`) ## self.report(" %s", `arg`)
self.error("*** %s %s unmanageable", type, name) self.report("*** %s %s unmanageable", type, name)
return return
self.alreadydone.append(name) self.alreadydone.append(name)
self.generate(type, name, arglist) self.generate(type, name, arglist)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment