I don't know precisely, but I can tell you that your call to
rb_define_method sets it up so the C function `talloc_free` is the
implementation of the Ruby `free` method -- not the function you have
defined as `free`. Also note that it's a bad idea (if it's allowed at
all) to name something `free` in C -- that's the name of the standard
library's free function.
···
On Mon, Apr 2, 2012 at 2:18 PM, Tridib Bandopadhyay <lists@ruby-forum.com> wrote:
I have created an extension and within the extension file I have
declared one function like-
VALUE free(T * self, VALUE name) //T is the struct
{
free(StringValuePtr(name));
}