D
dominic sisneros
I am trying to wrap a function that either takes a char * or NULL
How would I wrap this in swig?
The c version accepts a conts char * or NULL
librdf_node* librdf_new_node_from_blank_identifier(librdf_world *world,
const char * identifier);
I do a typemap as follows
I tried this but am still getting a TypeError converting Nil to String
%typemap(ruby,in) const char *identifier {
if $input == Qnil{
$1 == NULL;
else
$1 = STR2CSTR($input);
}
}
How would I wrap this in swig?
The c version accepts a conts char * or NULL
librdf_node* librdf_new_node_from_blank_identifier(librdf_world *world,
const char * identifier);
I do a typemap as follows
I tried this but am still getting a TypeError converting Nil to String
%typemap(ruby,in) const char *identifier {
if $input == Qnil{
$1 == NULL;
else
$1 = STR2CSTR($input);
}
}