• Per Cederqvist's avatar
    Configuration cleanup: use constructor/destructor semantics. · 7a036fc7
    Per Cederqvist authored
    * src/server/conf-file.h (struct datatype): Replaced the freer
    attribute with ctor and dtor attributes.  All users updated.
    Added some documentation.
    (free_config): New function.
    * src/server/conf-file.c (init_init): Call the constructors for
    all parameters.
    (free_config): New function, that calls the destructors for all
    parameters.
    (ctor_string): New static function. 
    (dtor_string): New static function, which replaces
    unassign_string.
    (assign_string): Expect the object to already be constructed.
    (unassign_string): Removed.
    (cf_string): Use ctor_string and dtor_string.
    * src/server/server-config.c (cf_log_param): Updated for new
    struct datatype.
    (cf_jubel): Ditto.
    (cf_ident_param): Ditto.
    (free_configuration): Use free_config to do the work.
    7a036fc7
conf-file.c 11.2 KB