gnucash stable: Add #ifdef __cplusplus extern "C" {} wrappers to .h files
Christopher Lam
clam at code.gnucash.org
Thu Feb 8 08:27:15 EST 2024
Updated via https://github.com/Gnucash/gnucash/commit/698cc230 (commit)
from https://github.com/Gnucash/gnucash/commit/ef094082 (commit)
commit 698cc23051e597f1f62d0b870edb30bf05d4d45c
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Feb 5 21:22:07 2024 +0800
Add #ifdef __cplusplus extern "C" {} wrappers to .h files
diff --git a/libgnucash/engine/cap-gains.h b/libgnucash/engine/cap-gains.h
index 61f953ed17..c8ced0be1c 100644
--- a/libgnucash/engine/cap-gains.h
+++ b/libgnucash/engine/cap-gains.h
@@ -82,6 +82,10 @@ ToDo:
#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 70d8318014..21e907b7f5 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 */
Summary of changes:
libgnucash/engine/cap-gains.h | 8 ++++++++
libgnucash/engine/gnc-lot-p.h | 8 ++++++++
2 files changed, 16 insertions(+)
More information about the gnucash-changes
mailing list