Apply patch #2955146 from Sergey Satskiy to fix expressions containing divide by operator in constructor initialization lists.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12013 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-05-07 19:10:41 +00:00
commit 68308583b7
4 changed files with 19 additions and 0 deletions

View file

@ -1,6 +1,10 @@
Version 2.0.0 (in progress)
============================
2010-05-07: wsfulton
Apply patch #2955146 from Sergey Satskiy to fix expressions containing divide by
operator in constructor initialization lists.
2010-05-05: wsfulton
[R] Memory leak fix handling const std::string & inputs, reported by Will Nolan.

View file

@ -193,6 +193,7 @@ CPP_TEST_CASES += \
extern_c \
extern_namespace \
extern_throws \
expressions \
features \
fragments \
friends \

View file

@ -0,0 +1,10 @@
%module expressions
%inline %{
struct A
{
A() : k( 20/(5-1) ) {}
A(int i) : k( 20/(5-1)*i /* comment */ ) {}
int k;
};
%}

View file

@ -1182,6 +1182,10 @@ int Scanner_skip_balanced(Scanner * s, int startchar, int endchar) {
state = 11;
else if (c == '*')
state = 12;
else if (c == startchar) {
state = 0;
num_levels++;;
}
else
state = 0;
break;