summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e86bee)
raw | patch | inline | side by side (parent: 3e86bee)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Aug 2013 18:35:00 +0000 (20:35 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Aug 2013 19:18:56 +0000 (21:18 +0200) |
This function expects an va_list argument rather than a "true" variadic list
of arguments.
of arguments.
src/core/object.c | patch | blob | history | |
src/include/core/object.h | patch | blob | history |
diff --git a/src/core/object.c b/src/core/object.c
index 7fbd5f025228831503fdc626516f3c9733eeff81..d6665e7cbd7546645093d0d97c68136dc17ed8a0 100644 (file)
--- a/src/core/object.c
+++ b/src/core/object.c
*/
sdb_object_t *
-sdb_object_create(const char *name, sdb_type_t type, ...)
+sdb_object_vcreate(const char *name, sdb_type_t type, va_list ap)
{
sdb_object_t *obj;
}
if (type.init) {
- va_list ap;
- va_start(ap, type);
-
if (type.init(obj, ap)) {
obj->ref_cnt = 1;
sdb_object_deref(obj);
- va_end(ap);
return NULL;
}
-
- va_end(ap);
}
obj->type = type;
obj->ref_cnt = 1;
return obj;
+} /* sdb_object_vcreate */
+
+sdb_object_t *
+sdb_object_create(const char *name, sdb_type_t type, ...)
+{
+ sdb_object_t *obj;
+ va_list ap;
+
+ va_start(ap, type);
+ obj = sdb_object_vcreate(name, type, ap);
+ va_end(ap);
+ return obj;
} /* sdb_object_create */
sdb_object_t *
index 016e718110090038ad5549e77c28a27aa0f1de34..23cd8565d92c0f18ad04d5764750891192bee981 100644 (file)
*/
sdb_object_t *
sdb_object_create(const char *name, sdb_type_t type, ...);
+sdb_object_t *
+sdb_object_vcreate(const char *name, sdb_type_t type, va_list ap);
/*
* sdb_object_create_wrapper: