gnucash stable: add extern "C" wrapper to header files

Christopher Lam clam at code.gnucash.org
Mon Mar 27 19:54:21 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/75456bbb (commit)
	from  https://github.com/Gnucash/gnucash/commit/77cb9c6a (commit)



commit 75456bbb298cd76f0e0889ad96975aeb3a2fa5bc
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon Mar 27 14:18:02 2023 +0800

    add extern "C" wrapper to header files
    
    to be usable from cpp

diff --git a/gnucash/gnome-utils/dialog-account.h b/gnucash/gnome-utils/dialog-account.h
index d0ac5611f9..9d59b9c9c0 100644
--- a/gnucash/gnome-utils/dialog-account.h
+++ b/gnucash/gnome-utils/dialog-account.h
@@ -26,6 +26,10 @@
 
 #include "Account.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Note: make sure to update the help text for this in prefs.scm if these
  * change!  These macros define the account types for which an auto interest
  * xfer dialog could pop up, if the user's preferences allow it.
@@ -180,6 +184,10 @@ void gnc_account_renumber_create_dialog (GtkWidget *window, Account *account);
 
 void gnc_account_cascade_properties_dialog (GtkWidget *window, Account *account);
 
+#ifdef __cplusplus
+}
+#endif
+
 /** @} */
 /** @} */
 
diff --git a/gnucash/gnome/window-reconcile.h b/gnucash/gnome/window-reconcile.h
index 9f4695bd9d..72284c9168 100644
--- a/gnucash/gnome/window-reconcile.h
+++ b/gnucash/gnome/window-reconcile.h
@@ -27,6 +27,10 @@
 #include "Account.h"
 #include <gtk/gtk.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 
 /** STRUCTS *********************************************************/
 typedef struct _RecnWindow RecnWindow;
@@ -66,4 +70,8 @@ void gnc_ui_reconcile_window_raise (RecnWindow * recnData);
 
 GtkWindow *gnc_ui_reconcile_window_get_window (RecnWindow * recnData);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* WINDOW_RECONCILE_H */



Summary of changes:
 gnucash/gnome-utils/dialog-account.h | 8 ++++++++
 gnucash/gnome/window-reconcile.h     | 8 ++++++++
 2 files changed, 16 insertions(+)



More information about the gnucash-changes mailing list