From: Dave Sims Date: 2005-04-16T07:53:40+09:00 Subject: Newbie Ruby and C question I'm trying to write an interface to the Ruby regular expressions engine using a C dll, but I'm neither a Ruby nor C wiz. Can someone tell me what's wrong with the following: #include #include typedef struct RRegexp RegExp; int regExMatch(int pos, char *pattern, char *text) { RegExp *re = RREGEXP(rb_reg_new(pattern, 0, 1)); result = rb_funcall(re, rb_intern("match"), 1, *text); // re will be a Ruby nil if no match is found. return RTEST(result); } I get a GPF on the first line of regExMatch. I just need a C method equivalent of Regexp.match that I can export in a dll. Is this even the best way to go about such a thing or is there something better? Dave