[redland-dev] Call a function or use struct directly?

Victor Porton porton at narod.ru
Mon Aug 18 18:32:08 EDT 2014


http://librdf.org/raptor/api/raptor2-section-locator.html

describes a structure raptor_locator and several access method which retrieve values from this structure:

int                 raptor_locator_line                 (raptor_locator *locator);
int                 raptor_locator_column               (raptor_locator *locator);
int                 raptor_locator_byte                 (raptor_locator *locator);
const char *        raptor_locator_file                 (raptor_locator *locator);
const char *        raptor_locator_uri                  (raptor_locator *locator);

In my Ada bindings, can I use the structure directly or should I call these functions?

I suppose that I may need to call functions from forward compatibility reasons, but accessing the fields of the structure directly would be more efficient.

So, should I use the fields of the structure directly or call the above listed functions?

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


More information about the redland-dev mailing list