Fix #2310483 - function pointer typedef within extern C block.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11742 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-11-14 15:55:23 +00:00
commit 7ae45bc020
5 changed files with 25 additions and 1 deletions

View file

@ -191,6 +191,7 @@ CPP_TEST_CASES += \
extend_placement \
extend_template \
extend_template_ns \
extern_c \
extern_namespace \
extern_throws \
features \

View file

@ -0,0 +1,16 @@
%module extern_c
%inline %{
extern "C" {
void RealFunction(int value);
typedef void Function1(int value); // Fails
typedef int Integer1;
}
typedef void Function2(int value); // Works
typedef int Integer2;
%}
%{
void RealFunction(int value) {}
%}

View file

@ -0,0 +1,4 @@
import extern_c
extern_c.RealFunction(2)