From: Jim Cain Date: 2003-07-03T03:08:09+09:00 Subject: Re: Ruby9i now available nobu.nokada@softhome.net wrote: > Hi, > > At Thu, 3 Jul 2003 02:16:33 +0900, > Daniel Berger wrote: > >>>This is because in 1.8 rb_str2cstr(VALUE, int*) has changed to >>>rb_str2cstr(VALUE, long*), and I've used ints for all my lengths. >> >>Ah, ok. Ruby has some #define's (in version.h) you could use to see >>which version you're building against (if you're feeling up to it). > > > It's not good idea to determin by release date or similar. > Also, basically, rb_str2cstr() is obsolete. You should use > StringValuePtr() and RSTRING()->ptr/len, instead. Excellent. That's just the kind of info I was looking for. I'll make the changes as I work on the code. > And the source looks like C++ or C99, doesn't it? > Funny you mention that. It's been years since I've coded in C. I used C++ extensively in 00-01, and neither of them since then, although I still play with C++ now and then. Between C and C++ I've only used C++ since 99, so I don't even remember all the picky little C++ things you can't do in standard C. Well, until the compiler complains about them. So I'm sure there's a lot of C++ influence in my C coding.