diff --git a/gnucash/import-export/CMakeLists.txt b/gnucash/import-export/CMakeLists.txt index 829ab1d826..a7a6510523 100644 --- a/gnucash/import-export/CMakeLists.txt +++ b/gnucash/import-export/CMakeLists.txt @@ -15,7 +15,7 @@ add_subdirectory(qif-imp) set (generic_import_SOURCES import-account-matcher.c - import-commodity-matcher.c + import-commodity-matcher.cpp import-backend.cpp import-format-dialog.c import-match-picker.cpp diff --git a/gnucash/import-export/import-commodity-matcher.c b/gnucash/import-export/import-commodity-matcher.cpp similarity index 97% rename from gnucash/import-export/import-commodity-matcher.c rename to gnucash/import-export/import-commodity-matcher.cpp index 3a75d66edb..afd5d58949 100644 --- a/gnucash/import-export/import-commodity-matcher.c +++ b/gnucash/import-export/import-commodity-matcher.cpp @@ -68,12 +68,12 @@ gnc_commodity * gnc_import_select_commodity(const char * cusip, for (GList *n = namespace_list; !retval && n; n = g_list_next (n)) { - const char *ns = n->data; + auto ns = static_cast(n->data); DEBUG("Looking at namespace %s", ns); GList *comm_list = gnc_commodity_table_get_commodities (commodity_table, ns); for (GList *m = comm_list; !retval && m; m = g_list_next (m)) { - gnc_commodity *com = m->data; + auto com = static_cast(m->data); DEBUG("Looking at commodity %s", gnc_commodity_get_fullname (com)); if (!g_strcmp0 (gnc_commodity_get_cusip (com), cusip)) { diff --git a/gnucash/import-export/import-commodity-matcher.h b/gnucash/import-export/import-commodity-matcher.h index 5171a07a4a..373c3e82cb 100644 --- a/gnucash/import-export/import-commodity-matcher.h +++ b/gnucash/import-export/import-commodity-matcher.h @@ -25,6 +25,10 @@ #ifndef IMPORT_COMMODITY_MATCHER_H #define IMPORT_COMMODITY_MATCHER_H +#ifdef __cplusplus +extern "C" { +#endif + #include "gnc-commodity.h" /** @@ -63,5 +67,10 @@ gnc_commodity * gnc_import_select_commodity(const char * cusip, const char * default_fullname, const char * default_mnemonic); + +#ifdef __cplusplus +} +#endif + #endif /**@}*/ diff --git a/po/POTFILES.in b/po/POTFILES.in index 94e5c3af25..7c9ffa4a51 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -348,7 +348,7 @@ gnucash/import-export/customer-import/dialog-customer-import-gui.c gnucash/import-export/customer-import/gnc-plugin-customer-import.c gnucash/import-export/import-account-matcher.c gnucash/import-export/import-backend.cpp -gnucash/import-export/import-commodity-matcher.c +gnucash/import-export/import-commodity-matcher.cpp gnucash/import-export/import-format-dialog.c gnucash/import-export/import-main-matcher.cpp gnucash/import-export/import-match-picker.cpp