httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Degenhardt <...@mp3.com>
Subject trivial addition
Date Sun, 04 Feb 2001 21:40:13 GMT
Would this be ok to add to config.c?
I end up writing this function in every module I make:


AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd,
                                                void *struct_ptr_v,
                                                const char *arg)
{
    /* this sets a generic integer slot */

    int offset = (int) (long) cmd->info;
    char *struct_ptr = (char *)struct_ptr_v;
    *(int *) (struct_ptr + offset) = atoi( arg );
    return NULL;
}
    



Mime
View raw message