From: William Djaja Tjokroaminata Date: 2002-10-03T08:44:22+09:00 Subject: Re: using pack and unpack from C Hi Ian, Any method call that you can do in Ruby you can do in general in C with "rb_funcall" (and several variants of it). So anObject.method (arg1, arg2, ...) can in general be translated to rb_funcall (anObject, rb_intern ("method"), n_args, arg1, arg2, ...) Regards, Bill ========================================================================== Ian Macdonald wrote: > Hi, > How do you call pack and unpack from C when writing an extension? > I would expect there to be rb_ary_pack() and rb_str_unpack() functions > defined in ruby.h or intern.h, but they're not there. > As usual, I have the feeling I'm missing something obvious, but we'll > see. > Ian > -- > Ian Macdonald | Have no friends not equal to yourself. -- > ian@caliban.org | Confucius > | > | > |