uhh, never mind, revert the last patch

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6475 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2002-01-02 06:31:49 +00:00
parent 32413b81d2
commit 20f13f9cd2
8 changed files with 12 additions and 25 deletions

View File

@ -80,7 +80,7 @@ xaccSchedXactionInit( SchedXaction *sx, GNCBook *book)
xaccAccountSetCommodity
(sx->template_acct,
gnc_commodity_new( "template", "template",
"template", "template", 1, book ) );
"template", "template", 1 ) );
g_free( name );
xaccAccountSetType( sx->template_acct, BANK );
ag = gnc_book_get_template_group( book );

View File

@ -86,7 +86,7 @@ gnc_book_init (GNCBook *book)
if(book->commodity_table)
{
if(!gnc_commodity_table_add_default_data(book->commodity_table, book))
if(!gnc_commodity_table_add_default_data(book->commodity_table))
PWARN("unable to initialize book's commodity_table");
}

View File

@ -43,7 +43,6 @@ static short module = MOD_ENGINE;
* in a 'unitname' unit. */
struct gnc_commodity_s {
GNCBook * book;
char * fullname;
char * namespace;
char * mnemonic;
@ -90,11 +89,10 @@ gnc_commodity *
gnc_commodity_new(const char * fullname,
const char * namespace, const char * mnemonic,
const char * exchange_code,
int fraction, GNCBook *book)
int fraction)
{
gnc_commodity * retval = g_new0(gnc_commodity, 1);
retval->book = book;
retval->fullname = g_strdup(fullname);
retval->namespace = g_strdup(namespace);
retval->mnemonic = g_strdup(mnemonic);
@ -234,13 +232,6 @@ gnc_commodity_get_mark(const gnc_commodity * cm)
return cm->mark;
}
GNCBook *
gnc_commodity_get_book(const gnc_commodity * cm)
{
if(!cm) return NULL;
return cm->book;
}
/********************************************************************
* gnc_commodity_set_mnemonic
********************************************************************/
@ -876,8 +867,7 @@ gnc_commodity_table_equal(gnc_commodity_table *t_1,
********************************************************************/
gboolean
gnc_commodity_table_add_default_data(gnc_commodity_table *table,
GNCBook *book)
gnc_commodity_table_add_default_data(gnc_commodity_table *table)
{
#include "./iso-4217-currencies.c"

View File

@ -41,8 +41,7 @@ gnc_commodity * gnc_commodity_new(const char * fullname,
const char * namespace,
const char * mnemonic,
const char * exchange_code,
int fraction,
GNCBook *);
int fraction);
void gnc_commodity_destroy(gnc_commodity * cm);
@ -54,7 +53,6 @@ const char * gnc_commodity_get_exchange_code(const gnc_commodity * cm);
const char * gnc_commodity_get_unique_name(const gnc_commodity * cm);
int gnc_commodity_get_fraction(const gnc_commodity * cm);
gint16 gnc_commodity_get_mark(const gnc_commodity * cm);
GNCBook * gnc_commodity_get_book(const gnc_commodity * cm);
void gnc_commodity_set_mnemonic(gnc_commodity * cm, const char * mnemonic);
void gnc_commodity_set_namespace(gnc_commodity * cm, const char * namespace);
@ -117,6 +115,6 @@ gboolean gnc_commodity_table_foreach_commodity(gnc_commodity_table * table,
gpointer user_data),
gpointer user_data);
gboolean gnc_commodity_table_add_default_data(gnc_commodity_table *table, GNCBook*);
gboolean gnc_commodity_table_add_default_data(gnc_commodity_table *table);
#endif

View File

@ -2143,8 +2143,7 @@ of having a parent transaction with which one is working...")
((<gw:m-chars-caller-owned> gw:const) namespace)
((<gw:m-chars-caller-owned> gw:const) mnemonic)
((<gw:m-chars-caller-owned> gw:const) exchange-code)
(<gw:int> smallest-fraction)
(<gnc:Book*> book))
(<gw:int> smallest-fraction) )
"Create a new gnc_commodity object.")
(gw:wrap-function

View File

@ -37,7 +37,7 @@ exec guile -s $0 "$@"
~S,
~S,
~S,
~S, book);\n
~S);\n
if(!c) {
PWARN(\"failed to create commodity for currency %s\", fullname);
} else {

View File

@ -1128,7 +1128,7 @@ get_random_commodity (GNCBook *book)
xcode = get_random_string();
ran_int = get_random_int_in_range(1, 100000);
ret = gnc_commodity_new (name, space, mn, xcode, ran_int, book);
ret = gnc_commodity_new (name, space, mn, xcode, ran_int);
g_free(mn);
g_free(name);

View File

@ -16,7 +16,7 @@ test_commodity(void)
gnc_commodity *com;
{
com = gnc_commodity_new(NULL, NULL, NULL, NULL, 0, NULL);
com = gnc_commodity_new(NULL, NULL, NULL, NULL, 0);
gnc_commodity_destroy(com);
@ -38,7 +38,7 @@ test_commodity(void)
fraction = get_random_int_in_range(0, 10000);
com = gnc_commodity_new(fullname, namespace, mnemonic,
exchange_code, fraction, NULL);
exchange_code, fraction);
do_test(
com != NULL, "commodity with data new and destroy");
@ -94,7 +94,7 @@ test_commodity(void)
"reset fraction code equal test");
com2 = gnc_commodity_new(fullname, namespace, mnemonic,
exchange_code, fraction, NULL);
exchange_code, fraction);
do_test(
gnc_commodity_equiv(com, com2), "commodity equiv");