aboutsummaryrefslogtreecommitdiffstats
path: root/USER/USER.xs
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2003-05-13 12:27:39 +0000
committerDaouda Lo <daouda@mandriva.com>2003-05-13 12:27:39 +0000
commit2c81cd591dc5ac774a80f55530a87a8cd4ce9d06 (patch)
treef9e87c414b6f626dee372f209c896010179c2a84 /USER/USER.xs
parent37378010b4b321239faed1d3da91af3ba7bf3716 (diff)
downloaduserdrake-2c81cd591dc5ac774a80f55530a87a8cd4ce9d06.tar
userdrake-2c81cd591dc5ac774a80f55530a87a8cd4ce9d06.tar.gz
userdrake-2c81cd591dc5ac774a80f55530a87a8cd4ce9d06.tar.bz2
userdrake-2c81cd591dc5ac774a80f55530a87a8cd4ce9d06.tar.xz
userdrake-2c81cd591dc5ac774a80f55530a87a8cd4ce9d06.zip
- call lu_start with &error
Diffstat (limited to 'USER/USER.xs')
-rw-r--r--USER/USER.xs19
1 files changed, 9 insertions, 10 deletions
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