From: ts Date: 2003-04-16T01:52:31+09:00 Subject: Re: rb_class_new_instance behaves strange >>>>> "L" == Lyle Johnson writes: L> 1.7.x) there seemed to be some problems. There's also the issue of L> backwards compatibility with Ruby versions 1.6.x and earlier. If SWIG is L> to generate code that will compile under both Ruby 1.6 and Ruby 1.8, L> there will presumably need to be a compile-time check of the Ruby L> version number. Nothing new for this, from bdb #if RUBY_VERSION_CODE < 180 #define StringValue(x,y) rb_str2cstr(x,y) #define StringValuePtr(x) STR2CSTR(x) #define SafeStringValue(x) Check_SafeStr(x) #endif #if RUBY_VERSION_CODE >= 180 rb_define_alloc_func(bdb_cEnv, bdb_env_s_alloc); #else rb_define_singleton_method(bdb_cEnv, "allocate", bdb_env_s_alloc, 0); #endif etc, etc Guy Decoux