From 3dedfee54e155649da7abc68a30676dbfe0759a2 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Fri, 7 Mar 2003 18:12:40 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4465 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/import_nomodule.i | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/SWIG/Examples/test-suite/import_nomodule.i b/SWIG/Examples/test-suite/import_nomodule.i index e280455f3..ab54c0ada 100644 --- a/SWIG/Examples/test-suite/import_nomodule.i +++ b/SWIG/Examples/test-suite/import_nomodule.i @@ -5,9 +5,18 @@ %import "import_nomodule.h" -#ifndef SWIGJAVA -// The proxy class does not have Bar derived from Foo, yet an instance of Bar can successfully be passed to a proxy function taking a Foo pointer. -// This violation of the type system is not possible in Java due to its static type checking. +#if !defined(SWIGJAVA) && !defined(SWIGRUBY) + +/** + * The proxy class does not have Bar derived from Foo, yet an instance of Bar + * can successfully be passed to a proxy function taking a Foo pointer (for some + * language modules). + * + * This violation of the type system is not possible in Java due to its static + * type checking. It's also not (currently) possible in Ruby, but this may be + * fixable (needs more investigation). + */ + %inline %{ Foo *create_Foo() { return new Foo(); @@ -18,7 +27,6 @@ void test1(Foo *f, Integer x) { }; class Bar : public Foo { }; %} + #endif - -