summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python_pythoncode.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python_pythoncode.i')
-rw-r--r--Examples/test-suite/python_pythoncode.i29
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/test-suite/python_pythoncode.i b/Examples/test-suite/python_pythoncode.i
new file mode 100644
index 000000000..d3593984f
--- /dev/null
+++ b/Examples/test-suite/python_pythoncode.i
@@ -0,0 +1,29 @@
+%module python_pythoncode
+
+// github issue#379 - these examples failed with 3.0.5 and earlier (at least as
+// far back as 1.3.37):
+
+struct TYPE {
+%pythoncode %{
+ def one():
+# Comment XXXX
+ return 1
+%}
+};
+
+%define %bar
+%pythoncode %{
+ def one():
+ # Comment XXXX
+ return 1
+%}
+%enddef
+
+struct TYPE2 {
+%bar
+};
+
+%{
+struct TYPE { };
+struct TYPE2 { };
+%}