From 2c81cd591dc5ac774a80f55530a87a8cd4ce9d06 Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Tue, 13 May 2003 12:27:39 +0000 Subject: - call lu_start with &error --- USER/USER.xs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'USER') diff --git a/USER/USER.xs b/USER/USER.xs index 272ada7..6f45ecc 100644 --- a/USER/USER.xs +++ b/USER/USER.xs @@ -21,8 +21,7 @@ typedef struct context USER__ADMIN; typedef struct lu_ent USER__ENT; typedef struct lu_error USER__ERR; -static SV ** -convert_value_array_list(register SV **sp, GValueArray *array) { +static SV ** convert_value_array_list(register SV **sp, GValueArray *array) { GValue *value; int i; long l; @@ -42,7 +41,7 @@ convert_value_array_list(register SV **sp, GValueArray *array) { return sp; } -char * +char * get_name(USER__ENT *ent, const char *attribute) { GValueArray *values; @@ -54,7 +53,7 @@ get_name(USER__ENT *ent, const char *attribute) return name; } -static int +static int get_int(USER__ENT *ent, const char *attribute) { GValueArray *values; @@ -72,26 +71,26 @@ USER::ADMIN * Admin_new(CLASS) char *CLASS CODE: - USER__ERR *error == NULL; - RETVAL = (USER__ADMIN *)safemalloc( sizeof( USER__ADMIN ) ); + USER_ERR *error = NULL; + RETVAL = (USER__ADMIN *)lu_start(NULL, 0, NULL, NULL, lu_prompt_console_quiet, NULL, &error); if( RETVAL == NULL ){ warn("unable to malloc USER__ADMIN"); XSRETURN_UNDEF; } - RETVAL = lu_start(NULL, 0, NULL, NULL, lu_prompt_console_quiet, NULL, &error); OUTPUT: RETVAL - -void + +void Admin_DESTROY(self) USER::ADMIN *self CODE: + printf("freeing ADMIN"); if (self) { lu_end(self); self = NULL; }; lu_ctx_free(self); - + void Admin_lookup_user_name(self, name) USER::ADMIN *self -- cgit v1.2.1