[Gnucash-changes] r14279 - gnucash/branches/register-rewrite/src/engine - Change return value type of gnc_commodity_table_has_namespace() to gboolean.

Chris Shoemaker chris at cvs.gnucash.org
Tue May 30 22:04:29 EDT 2006


Author: chris
Date: 2006-05-30 22:04:28 -0400 (Tue, 30 May 2006)
New Revision: 14279
Trac: http://svn.gnucash.org/trac/changeset/14279

Modified:
   gnucash/branches/register-rewrite/src/engine/gnc-commodity.c
   gnucash/branches/register-rewrite/src/engine/gnc-commodity.h
Log:
   Change return value type of gnc_commodity_table_has_namespace() to gboolean.


Modified: gnucash/branches/register-rewrite/src/engine/gnc-commodity.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-commodity.c	2006-05-31 01:59:42 UTC (rev 14278)
+++ gnucash/branches/register-rewrite/src/engine/gnc-commodity.c	2006-05-31 02:04:28 UTC (rev 14279)
@@ -1300,7 +1300,7 @@
  * see if the commodities namespace exists. May have zero commodities.
  ********************************************************************/
 
-int
+gboolean
 gnc_commodity_table_has_namespace(const gnc_commodity_table * table,
                                   const char * namespace) 
 {
@@ -1309,7 +1309,7 @@
   if (!table || !namespace) return 0;
 
   nsp = gnc_commodity_table_find_namespace(table, namespace);
-  return nsp ? 1 : 0;
+  return (nsp != NULL);
 }
 
 static void 

Modified: gnucash/branches/register-rewrite/src/engine/gnc-commodity.h
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-commodity.h	2006-05-31 01:59:42 UTC (rev 14278)
+++ gnucash/branches/register-rewrite/src/engine/gnc-commodity.h	2006-05-31 02:04:28 UTC (rev 14279)
@@ -724,10 +724,10 @@
  *
  *  @param namespace The new namespace to check.
  *
- *  @return 1 if the namespace exists. 0 if it doesn't exist, or the
+ *  @return TRUE if the namespace exists. FALSE if it doesn't exist, or the
  *  routine was passed a bad argument. */
-int gnc_commodity_table_has_namespace(const gnc_commodity_table * table,
-				      const char * namespace);
+gboolean gnc_commodity_table_has_namespace(const gnc_commodity_table * table,
+                                           const char * namespace);
 
 /** Return a list of all namespaces in the commodity table.  This
  *  returns both system and user defined namespaces.



More information about the gnucash-changes mailing list