Previously SWIG looked at the indentation of the first line and removed that many characters from each subsequent line, regardless of what those characters were. This was made worse because SWIG's preprocessor removes any whitespace before a '#'. Fixes github issue #379, reported by Joe Orton.
29 lines
367 B
OpenEdge ABL
29 lines
367 B
OpenEdge ABL
%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 { };
|
|
%}
|