API Questions

NH Rao nhrdls at gmail.com
Tue May 5 16:30:37 EDT 2026


Greetings,

I am experimenting with Java FFM API to call gnucash API functions. So far
I am able to emulate the functionality of
bindings/python/example_scripts/export_account_totals.py with similar
results. This was a just POC and now I am seriously attempting to write
proper code.

Some questions

I am using headers files which start with capital letters (e.g. Account.h)
as it felt like convention is to expose API from these files. Did I get
this right?

I am just using libgnc-engine.so when importing a shared library. Do I need
to import any other shared libraries for the API functionality?

Many functions return const char* e.g. const char * xaccAccountGetName
(const Account *account); but the header file does not mention that the
caller has to free the returned pointer. But gnc_numeric_to_string
explicitly mentions that the caller has to free the memory.  Is it safe to
assume that if there is no explicit comment, I don't need to worry about
freeing the memory

Regards,

Niranjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20260505/7e261008/attachment.htm>


More information about the gnucash-devel mailing list