diff --git a/src/engine/GNCId.c b/src/engine/GNCId.c index 47cc31f3c7..3f0ceba319 100644 --- a/src/engine/GNCId.c +++ b/src/engine/GNCId.c @@ -238,16 +238,6 @@ xaccGUIDNew (GUID *guid, GNCSession *session) xaccGUIDNewEntityTable (guid, gnc_session_get_entity_table (session)); } -GUID -xaccGUIDNewReturn (GNCSession *session) -{ - GUID guid; - - xaccGUIDNew (&guid, session); - - return guid; -} - const GUID * xaccGUIDNULL(void) { diff --git a/src/engine/GNCIdP.h b/src/engine/GNCIdP.h index 19f0fea662..87de305b1b 100644 --- a/src/engine/GNCIdP.h +++ b/src/engine/GNCIdP.h @@ -44,7 +44,6 @@ void xaccEntityTableDestroy (GNCEntityTable *table); * use this function and not guid_new! */ void xaccGUIDNew (GUID *guid, GNCSession *session); void xaccGUIDNewEntityTable (GUID *guid, GNCEntityTable *entity_table); -GUID xaccGUIDNewReturn (GNCSession *session); /* Lookup an entity given an id and a type. If there is no entity * associated with the id, or if it has a different type, NULL diff --git a/src/engine/guid.c b/src/engine/guid.c index 1cd2cb4e21..fb45c2c69e 100644 --- a/src/engine/guid.c +++ b/src/engine/guid.c @@ -411,6 +411,16 @@ guid_new(GUID *guid) counter--; } +GUID +guid_new_return(void) +{ + GUID guid; + + guid_new (&guid); + + return guid; +} + /* needs 32 bytes exactly, doesn't print a null char */ static void encode_md5_data(const unsigned char *data, char *buffer) diff --git a/src/engine/guid.h b/src/engine/guid.h index 9428530568..fcd623c849 100644 --- a/src/engine/guid.h +++ b/src/engine/guid.h @@ -71,6 +71,7 @@ void guid_init_only_salt(const void *salt, size_t salt_len); /* Generate a new id. If no initialization function has been called, * guid_init() will be called before the id is created. */ void guid_new(GUID *guid); +GUID guid_new_return(void); /* The guid_to_string() routine returns a null-terminated string diff --git a/src/engine/gw-engine-spec.scm b/src/engine/gw-engine-spec.scm index 5205ce04fc..e5e5949b11 100644 --- a/src/engine/gw-engine-spec.scm +++ b/src/engine/gw-engine-spec.scm @@ -310,7 +310,7 @@ (lambda (client-only?) (list "#include \n" - "#include \n" + "#include \n" "#include \n" "#include \n" "#include \n" @@ -518,8 +518,8 @@ mod 'gnc:guid-new ' - "xaccGUIDNewReturn" - '(( session)) + "guid_new_return" + '() "Return a newly-generated GUID.") (gw:wrap-function