[redland-dev] Ruby-wrapper

dominic sisneros dom at sisna.com
Tue Apr 6 04:44:26 BST 2004


Just writing to let you know, I am building a wrapper for redland in 
ruby.

http://rubyforge.org/projects/ruby-rdf/

I did find a problem in the Redland.i file.  The function
librdf_new_node_from_blank_identifier(librdf_world *world, const char 
*identifier);
needs to either accept a nil or a char string.  Right now it gives an 
error if I give a
nil value so I cannot do blank nodes without and identifier.  If you 
could add the following:
to Redland.i, it works as required.

%typemap(ruby,in) const char *identifier{
   if ($input == Qnil){
     $1 = NULL;
   }
   else{
     $1 = STR2CSTR($input);
       }
}
librdf_node* librdf_new_node_from_blank_identifier(librdf_world *world, 
const char *identifier);

Thanks in advance and thanks for the library

Dom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 865 bytes
Desc: not available
Url : http://lists.usefulinc.com/pipermail/redland-dev/attachments/20040405/9f7ed61a/attachment.bin


More information about the redland-dev mailing list