summaryrefslogtreecommitdiffstats
path: root/Tools/bgen
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/bgen')
-rw-r--r--Tools/bgen/bgen/macsupport.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/bgen/bgen/macsupport.py b/Tools/bgen/bgen/macsupport.py
index d8677b0..8301864 100644
--- a/Tools/bgen/bgen/macsupport.py
+++ b/Tools/bgen/bgen/macsupport.py
@@ -157,7 +157,9 @@ class WeakLinkMixIn:
"Mix-in to test the function actually exists (!= NULL) before calling"
def precheck(self):
+ Output('#ifndef %s', self.name)
Output('PyMac_PRECHECK(%s);', self.name)
+ Output('#endif')
class WeakLinkFunctionGenerator(WeakLinkMixIn, FunctionGenerator): pass
class WeakLinkMethodGenerator(WeakLinkMixIn, MethodGenerator): pass