[redland-dev] Segmentation Fault - Using Raptor
Dave Beckett
dave.beckett at bristol.ac.uk
Mon Jul 18 11:47:58 BST 2005
On Sun, 2005-07-17 at 15:53 -0400, Vinay Solanki wrote:
>
> raptor_init();
> raptor_parser *p=raptor_new_parser("rdfxml");
>
> raptor_statement_handler print_statements;
^- this is the cause of the crash. You must use a pointer to a real
function here rather than declare an uninitialised function pointer
local variable.
> raptor_set_statement_handler(p,NULL,print_statements);
>
> raptor_uri *file_uri = raptor_new_uri((const unsigned
> char*)"http://www.ilrt.bris.ac.uk/discovery/rdf/resources/rss.rdf");
>
> raptor_parse_file(p,file_uri,NULL);
> raptor_parse_uri(p,file_uri,NULL);
> raptor_free_parser(p);
> raptor_free_uri(file_uri);
> raptor_finish();
See rdfdump.c for an example of a print handler - print_statements.
Dave
More information about the redland-dev
mailing list