Niklas C. wrote: > While trying to bind some old C code to ruby I ran into trouble > converting strings. The function in question requires two string > arguments (const char*). This is the relevant part of my binding: > Try adding the following lines to see what the objects really are: > ... > static VALUE rb_ldist(VALUE s, VALUE t) > { rb_p(s); rb_p(t); > return INT2FIX(ldist(StringValuePtr(s),StringValuePtr(t))); > } > ... (Btw, README.EXT should mention this function. It's very useful.) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407