Where is the definition of `struct ap_conf_vector_t`? Where is the definition of `struct ap_conf_vector_t`? apache apache

Where is the definition of `struct ap_conf_vector_t`?


ap_conf_vector_t seems to be an opaque datatype. This is usually used in the old days to define a stable api which the possibility to later change the implementation without changes to the api.

ap_conf_vector_t is only used as a parameter to the api functions like:

  • ap_get_module_config
  • ap_parse_htaccess

You are not supposed to manipulate the members of this structure directly. Kind of OO programming, you only can use the supplied functions.


The definition can be found in http_config.h as follows:

    typedef struct ap_conf_vector_t ap_conf_vector_t;

It is like void pointer. To understand better, study the following program:

    typedef struct generic_struct_for_pointer generic_struct_for_pointer;    int main(void)    {            generic_struct_for_pointer *ptr;            typedef struct            {                    int x,y;            } position;                 position p = {1,2};            ptr = (generic_struct_for_pointer *) &p;            return 1;    }