From b53355ad773723aa9f9ac4d70f21010a80e07d62 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 20 Sep 2005 15:13:53 +0000 Subject: Added support for (optionally) bracketing calls with Py_{BEGIN,END}_ALLOW_THREADS. --- Tools/bgen/bgen/bgenGenerator.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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: -- cgit v0.12