[redland-dev] Subtle error in Redland or Ada bindings

Victor Porton porton at narod.ru
Tue Aug 5 12:33:52 EDT 2014


It seems that I understood the cause of the error:

It is implicit finalization (that is "calling destructor" in C++ terms) of an Ada object.

Now I need to invent something to work around of this problem.

05.08.2014, 19:18, "Victor Porton" <porton at narod.ru>:
> 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.
>
> --
> Victor Porton - http://portonvictor.org
> _______________________________________________
> redland-dev mailing list
> redland-dev at lists.librdf.org
> http://lists.librdf.org/mailman/listinfo/redland-dev

--
Victor Porton - http://portonvictor.org


More information about the redland-dev mailing list