summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2005-09-20 15:13:53 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2005-09-20 15:13:53 (GMT)
commitb53355ad773723aa9f9ac4d70f21010a80e07d62 (patch)
treef62ae2bf599fcd88d802513ce075768883931a94 /Tools
parentf3f231f60cd59e9e1bceccde11a1997054a73113 (diff)
downloadcpython-b53355ad773723aa9f9ac4d70f21010a80e07d62.zip
cpython-b53355ad773723aa9f9ac4d70f21010a80e07d62.tar.gz
cpython-b53355ad773723aa9f9ac4d70f21010a80e07d62.tar.bz2
Added support for (optionally) bracketing calls with
Py_{BEGIN,END}_ALLOW_THREADS.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/bgen/bgen/bgenGenerator.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py
index 0cf4002..7b54579 100644
--- a/Tools/bgen/bgen/bgenGenerator.py
+++ b/Tools/bgen/bgen/bgenGenerator.py
@@ -216,6 +216,12 @@ class FunctionGenerator(BaseFunctionGenerator):
def precheck(self):
pass
+ def beginallowthreads(self):
+ pass
+
+ def endallowthreads(self):
+ pass
+
def callit(self):
args = ""
s = "%s%s(" % (self.getrvforcallit(), self.callname)
@@ -226,8 +232,10 @@ class FunctionGenerator(BaseFunctionGenerator):
s = arg.passArgument()
if args: s = sep + s
args = args + s
+ self.beginallowthreads()
Output("%s%s(%s);",
self.getrvforcallit(), self.callname, args)
+ self.endallowthreads()
def getrvforcallit(self):
if self.rv: