X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fconf-section.c;h=f25657d287c7448f1d5744f269c22fd27e0d9f55;hb=ba476db22e16bed8a9a4a9d7a05aa09bf35411c8;hp=4448ada6afc3da053582a031264d933d6c223862;hpb=bf7544ae9cf66f4c1c83baff63800326eae809d7;p=libucw.git diff --git a/ucw/conf-section.c b/ucw/conf-section.c index 4448ada6..f25657d2 100644 --- a/ucw/conf-section.c +++ b/ucw/conf-section.c @@ -92,9 +92,9 @@ 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_get_context(); + struct cf_context *cc = cf_obtain_context(); if (!cc->sections.cfg) { cc->sections.size = 50; @@ -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) {