diff --git a/src/backend/xml/gnc-commodity-xml-v2.cpp b/src/backend/xml/gnc-commodity-xml-v2.cpp index 69d7f181c2..2eaf48c1bb 100644 --- a/src/backend/xml/gnc-commodity-xml-v2.cpp +++ b/src/backend/xml/gnc-commodity-xml-v2.cpp @@ -76,7 +76,7 @@ gnc_commodity_dom_tree_create (const gnc_commodity* com) xmlSetProp (ret, BAD_CAST "version", BAD_CAST commodity_version_string); xmlAddChild (ret, text_to_dom_tree (cmdty_namespace, - gnc_commodity_get_namespace_compat (com))); + gnc_commodity_get_namespace (com))); xmlAddChild (ret, text_to_dom_tree (cmdty_id, gnc_commodity_get_mnemonic (com))); diff --git a/src/backend/xml/sixtp-dom-generators.cpp b/src/backend/xml/sixtp-dom-generators.cpp index 8fd9b7d2fd..d659da5dfa 100644 --- a/src/backend/xml/sixtp-dom-generators.cpp +++ b/src/backend/xml/sixtp-dom-generators.cpp @@ -120,7 +120,7 @@ commodity_ref_to_dom_tree (const char* tag, const gnc_commodity* c) { return NULL; } - name_space = g_strdup (gnc_commodity_get_namespace_compat (c)); + name_space = g_strdup (gnc_commodity_get_namespace (c)); mnemonic = g_strdup (gnc_commodity_get_mnemonic (c)); xmlNewTextChild (ret, NULL, BAD_CAST "cmdty:space", checked_char_cast (name_space)); diff --git a/src/backend/xml/test/test-xml-commodity.cpp b/src/backend/xml/test/test-xml-commodity.cpp index afb9d0ef8b..8da5956c85 100644 --- a/src/backend/xml/test/test-xml-commodity.cpp +++ b/src/backend/xml/test/test-xml-commodity.cpp @@ -70,7 +70,7 @@ node_and_commodity_equal (xmlNodePtr node, const gnc_commodity* com) else if (g_strcmp0 ((char*)mark->name, "cmdty:space") == 0) { if (!equals_node_val_vs_string ( - mark, gnc_commodity_get_namespace_compat (com))) + mark, gnc_commodity_get_namespace (com))) { return "namespaces differ"; } diff --git a/src/engine/gnc-commodity.c b/src/engine/gnc-commodity.c index db97e8f9cc..5b0ce4ee9b 100644 --- a/src/engine/gnc-commodity.c +++ b/src/engine/gnc-commodity.c @@ -1020,22 +1020,6 @@ gnc_commodity_get_namespace(const gnc_commodity * cm) return gnc_commodity_namespace_get_name(GET_PRIVATE(cm)->name_space); } -const char * -gnc_commodity_get_namespace_compat(const gnc_commodity * cm) -{ - CommodityPrivate* priv; - - if (!cm) return NULL; - priv = GET_PRIVATE(cm); - if (!priv->name_space) return NULL; - if (priv->name_space->iso4217) - { - /* Data files are still written with ISO4217. */ - return GNC_COMMODITY_NS_ISO; - } - return gnc_commodity_namespace_get_name(priv->name_space); -} - gnc_commodity_namespace * gnc_commodity_get_namespace_ds(const gnc_commodity * cm) { diff --git a/src/engine/gnc-commodity.h b/src/engine/gnc-commodity.h index 161996e50a..8daa83b375 100644 --- a/src/engine/gnc-commodity.h +++ b/src/engine/gnc-commodity.h @@ -340,20 +340,6 @@ const char * gnc_commodity_get_mnemonic(const gnc_commodity * cm); */ const char * gnc_commodity_get_namespace(const gnc_commodity * cm); -/** Retrieve the namespace for the specified commodity. This will be - * a pointer to a null terminated string of the form "AMEX", - * "NASDAQ", etc. The only difference between function and - * gnc_commodity_get_namespace() is that this function returns - * ISO4217 instead of CURRENCY for backward compatibility with the - * 1.8 data files. - * - * @param cm A pointer to a commodity data structure. - * - * @return A pointer to the namespace for this commodity. This string - * is owned by the engine and should not be freed by the caller. - */ -const char * gnc_commodity_get_namespace_compat(const gnc_commodity * cm); - /** Retrieve the namespace data strucure for the specified commodity. * This will be a pointer to another data structure. *