From 698cc23051e597f1f62d0b870edb30bf05d4d45c Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 5 Feb 2024 21:22:07 +0800 Subject: [PATCH] Add #ifdef __cplusplus extern "C" {} wrappers to .h files --- libgnucash/engine/cap-gains.h | 8 ++++++++ libgnucash/engine/gnc-lot-p.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/libgnucash/engine/cap-gains.h b/libgnucash/engine/cap-gains.h index 61f953ed170..c8ced0be1c3 100644 --- a/libgnucash/engine/cap-gains.h +++ b/libgnucash/engine/cap-gains.h @@ -82,6 +82,10 @@ #include "gnc-engine.h" +#ifdef __cplusplus +extern "C" { +#endif + /** The xaccSplitGetCapGains() method returns the value of * capital gains (if any) associated with the indicated * split. In order for there to be any capital gains, @@ -205,6 +209,10 @@ Split * xaccSplitAssignToLot (Split *split, GNCLot *lot); void xaccSplitComputeCapGains(Split *split, Account *gain_acc); void xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc); +#ifdef __cplusplus +} +#endif + #endif /* XACC_CAP_GAINS_H */ /** @} */ /** @} */ diff --git a/libgnucash/engine/gnc-lot-p.h b/libgnucash/engine/gnc-lot-p.h index 70d83180143..21e907b7f51 100644 --- a/libgnucash/engine/gnc-lot-p.h +++ b/libgnucash/engine/gnc-lot-p.h @@ -37,9 +37,17 @@ #ifndef GNC_LOT_P_H #define GNC_LOT_P_H +#ifdef __cplusplus +extern "C" { +#endif + #define gnc_lot_set_guid(L,G) qof_instance_set_guid(QOF_INSTANCE(L),&(G)) /* Register with the Query engine */ gboolean gnc_lot_register (void); +#ifdef __cplusplus +} +#endif + #endif /* GNC_LOT_P_H */