Add #ifdef __cplusplus extern "C" {} wrappers to .h files

This commit is contained in:
Christopher Lam 2024-02-05 21:22:07 +08:00
parent ef094082b1
commit 698cc23051
2 changed files with 16 additions and 0 deletions

View File

@ -82,6 +82,10 @@ ToDo:
#include "gnc-engine.h" #include "gnc-engine.h"
#ifdef __cplusplus
extern "C" {
#endif
/** The xaccSplitGetCapGains() method returns the value of /** The xaccSplitGetCapGains() method returns the value of
* capital gains (if any) associated with the indicated * capital gains (if any) associated with the indicated
* split. In order for there to be any capital gains, * 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 xaccSplitComputeCapGains(Split *split, Account *gain_acc);
void xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc); void xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc);
#ifdef __cplusplus
}
#endif
#endif /* XACC_CAP_GAINS_H */ #endif /* XACC_CAP_GAINS_H */
/** @} */ /** @} */
/** @} */ /** @} */

View File

@ -37,9 +37,17 @@
#ifndef GNC_LOT_P_H #ifndef GNC_LOT_P_H
#define 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)) #define gnc_lot_set_guid(L,G) qof_instance_set_guid(QOF_INSTANCE(L),&(G))
/* Register with the Query engine */ /* Register with the Query engine */
gboolean gnc_lot_register (void); gboolean gnc_lot_register (void);
#ifdef __cplusplus
}
#endif
#endif /* GNC_LOT_P_H */ #endif /* GNC_LOT_P_H */