>>>>> "S" == Simon Strandgaard <0bz63fz3m1qt3001 / sneakemail.com> writes:

S> http://metaeditor.sourceforge.net/embed/rubyembed-0.1.tar.gz

 I've not found 1.3.18, at sourceforge there is only .19, .17

pigeon% swig -version

SWIG Version 1.3.19
Copyright (c) 1995-1998
University of Utah and the Regents of the University of California
Copyright (c) 1998-2002
University of Chicago
Compiled with g++

Please see http://www.swig.org for reporting bugs and further information
pigeon% 

pigeon% ruby -v
ruby 1.8.0 (2003-04-10) [i686-linux]
pigeon% 

pigeon% tail -18 rubycpp.cpp
        VALUE self = rb_class_new_instance(a.n, a.argv, klass);
        //VALUE self = rb_funcall2(klass, rb_intern("new"), a.n, a.argv);
        return self;
}

VALUE New(string klass) {
        NewArguments arg(klass.c_str(), 0, 0);
        int error = 0;
        VALUE self = rb_protect(NewWrap, reinterpret_cast<VALUE>(&arg), &error);
        if(error) {
                std::ostringstream o;
                o << "error creating " << klass;
                throw RUBY_CPP::RubyError::Create(o.str());
        }
        return self;
}

} // end of namespace RUBY_CPP
pigeon% 

 and I've no problems


pigeon% ./testswig
main: enter
test.rb: enter
test.rb: leave
aeditorlib: started (no-swig)
-- Test1 simple ---------------------- 
view.ctor: enter
redirect.ctor: hello
rubyview.initialize: overloaded
objects += 401f530c
view.ctor: leave
view.insert: enter
rubyview.insert: enter
redirect.repaint: enter
viewqt.repaint: bingo
redirect.repaint: leave
rubyview.insert: leave
view.insert: leave
view.dtor: enter
objects -= 401f530c
view.dtor: leave
-- Test2 multiple instances ---------------------- 
[1]
view.ctor: enter
redirect.ctor: hello
rubyview.initialize: overloaded
objects += 401f4858
view.ctor: leave
view.insert: enter
rubyview.insert: enter
redirect.repaint: enter
viewqt.repaint: bingo
redirect.repaint: leave
rubyview.insert: leave
view.insert: leave
[2]
view.ctor: enter
redirect.ctor: hello
rubyview.initialize: overloaded
objects += 401f4808
view.ctor: leave
view.insert: enter
rubyview.insert: enter
redirect.repaint: enter
viewqt.repaint: bingo
redirect.repaint: leave
rubyview.insert: leave
view.insert: leave
[3]
view.insert: enter
rubyview.insert: enter
redirect.repaint: enter
viewqt.repaint: bingo
redirect.repaint: leave
rubyview.insert: leave
view.insert: leave
[4]
view.ctor: enter
redirect.ctor: hello
rubyview.initialize: overloaded
objects += 401f47b8
view.ctor: leave
view.insert: enter
rubyview.insert: enter
redirect.repaint: enter
viewqt.repaint: bingo
redirect.repaint: leave
rubyview.insert: leave
view.insert: leave
[5]
view.dtor: enter
objects -= 401f47b8
view.dtor: leave
view.dtor: enter
objects -= 401f4808
view.dtor: leave
view.dtor: enter
objects -= 401f4858
view.dtor: leave
-- End ------------------------------------
redirect.dtor: hello
redirect.dtor: hello
redirect.dtor: hello
redirect.dtor: hello
aeditorlib: stopped
main: leave (0)
pigeon% 



Guy Decoux