]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/conf-section.c
Opt: Tests and some minor fixes
[libucw.git] / ucw / conf-section.c
index c7bd32473be5c3bb8d686f5578ff8ab86d023045..f25657d287c7448f1d5744f269c22fd27e0d9f55 100644 (file)
@@ -92,7 +92,7 @@ inspect_section(struct cf_section *sec)
 }
 
 void
-cf_declare_section(const char *name, struct cf_section *sec, uns allow_unknown)
+cf_declare_rel_section(const char *name, struct cf_section *sec, void *ptr, uns allow_unknown)
 {
   struct cf_context *cc = cf_obtain_context();
   if (!cc->sections.cfg)
@@ -106,7 +106,7 @@ cf_declare_section(const char *name, struct cf_section *sec, uns allow_unknown)
   ci->cls = CC_SECTION;
   ci->name = name;
   ci->number = 1;
-  ci->ptr = NULL;
+  ci->ptr = ptr;
   ci->u.sec = sec;
   inspect_section(sec);
   if (allow_unknown)
@@ -120,6 +120,12 @@ cf_declare_section(const char *name, struct cf_section *sec, uns allow_unknown)
   }
 }
 
+void
+cf_declare_section(const char *name, struct cf_section *sec, uns allow_unknown)
+{
+  cf_declare_rel_section(name, sec, NULL, allow_unknown);
+}
+
 void
 cf_init_section(const char *name, struct cf_section *sec, void *ptr, uns do_bzero)
 {