From 7b6b8d042c36e30cfb03881887cde5562ecf6418 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 1 Mar 2005 00:00:19 +0000 Subject: [PATCH] fix VC7.1 compilation problem git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7017 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/python/callback.i | 11 ++++++----- SWIG/Examples/test-suite/template_default.i | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/SWIG/Examples/test-suite/python/callback.i b/SWIG/Examples/test-suite/python/callback.i index a71366439..c4d50d3fe 100644 --- a/SWIG/Examples/test-suite/python/callback.i +++ b/SWIG/Examples/test-suite/python/callback.i @@ -12,6 +12,10 @@ return a; } + int foof(int a) { + return 3*a; + } + struct A { static int bar(int a) { @@ -23,12 +27,9 @@ return -a; } - friend int foof(int a) - { - return 3*a; - } + //friend int foof(int a); }; - + extern "C" int foobar(int a, int (*pf)(int a)) { return pf(a); diff --git a/SWIG/Examples/test-suite/template_default.i b/SWIG/Examples/test-suite/template_default.i index 1da1765a2..54df21b45 100644 --- a/SWIG/Examples/test-suite/template_default.i +++ b/SWIG/Examples/test-suite/template_default.i @@ -181,7 +181,10 @@ namespace ns1 { typedef void (*TFunc2)(CTemplate arg); // OK typedef void (*TFunc3)(CTemplate* arg); // OK - int foo(TFunc1 a, TFunc2 b, TFunc3 c); + int foo(TFunc1 a, TFunc2 b, TFunc3 c) + { + return 0; + } } %}