On 8/5/14, 9:17 AM, Victor Porton wrote: > In > https://github.com/vporton/redland-bindings/tree/e0d5aa40de42fb1aad4cecb27e59c8dd566cc84a > the Ada program src/test/special_test.adb prints '0' as the value of a > pointer which is created by raptor_new_uri_from_counted_string() and must not > be NULL. > > I suspect that this is an error in Raptor itself not my Ada code. > > Investigating this error is specifically difficult. I will try more, but it > is hard. > > It is also weird that replacing > > URI_1_Handle: constant RDF.Raptor.URI.Handle_Type := > Get_Handle(From_String(World, URI_1)); > -- URI_1_Handle: constant RDF.Raptor.URI.Handle_Type := > -- C_Raptor_New_Uri_From_Counted_String(Get_Handle(World), To_C(URI_1, > Append_Nul=>True), URI_1'Length); > > with equivalent code > > -- URI_1_Handle: constant RDF.Raptor.URI.Handle_Type := > Get_Handle(From_String(World, URI_1)); > URI_1_Handle: constant RDF.Raptor.URI.Handle_Type := > C_Raptor_New_Uri_From_Counted_String(Get_Handle(World), To_C(URI_1, > Append_Nul=>True), URI_1'Length); > > eliminates the error. I have no idea why.
I updated the GIT code for raptor_new_uri_from_counted_string() to not assume that there is a NUL. Dave _______________________________________________ redland-dev mailing list [email protected] http://lists.librdf.org/mailman/listinfo/redland-dev
