mirror of https://github.com/Gnucash/gnucash
Add GNC_ACCEPT_WRAPPER macro that generates %typemap(in) entries for
all core engine and business pointer types. These typemaps accept both
raw SWIG pointers (zero-overhead fast path) and ClassFromFunctions
wrapper objects (fallback path that extracts .instance).
This is pure infrastructure for an upcoming change that fixes missing
return-type wrapping in gnucash_core.py. Once methods like
GncPriceDB.nth_price() return proper GncPrice wrapper objects instead
of raw SwigPyObjects, existing code that passes those objects to
gnucash_core_c C functions would break. These typemaps prevent that
breakage: the C functions transparently unwrap the .instance pointer.
Covered types:
Core: Account, Split, Transaction, GNCLot, gnc_commodity,
gnc_commodity_namespace, gnc_commodity_table, GNCPrice,
GNCPriceDB, QofBook, QofSession, GncGUID
Business: GncCustomer, GncEmployee, GncVendor, GncJob,
GncAddress, GncBillTerm, GncTaxTable, GncInvoice, GncEntry
GncOwner is excluded — it has its own custom type-dispatching typemaps.
pull/2186/head
parent
8538dcf9ac
commit
e4ec72c97c
Loading…
Reference in new issue