summaryrefslogtreecommitdiffstats
path: root/python_modules/codegen.py
diff options
context:
space:
mode:
Diffstat (limited to 'python_modules/codegen.py')
-rw-r--r--python_modules/codegen.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python_modules/codegen.py b/python_modules/codegen.py
index 6d53551..009cf95 100644
--- a/python_modules/codegen.py
+++ b/python_modules/codegen.py
@@ -328,6 +328,12 @@ class CodeWriter:
self.write("#ifdef %s" % (name)).newline()
self.indentation = indentation
+ def ifdef_else(self, name):
+ indentation = self.indentation
+ self.indentation = 0;
+ self.write("#else /* %s */" % (name)).newline()
+ self.indentation = indentation
+
def endif(self, name):
indentation = self.indentation
self.indentation = 0;