>> while our code interface into it is parms->info->cmd_data that's not
>> the way
>> a C programmer would use it.  over in C land the directive handler
>> interface
>> looks exactly like the current perl interface.

> What you are missing is that a user is passing that data using the
> 'cmd_data' hash key, so trying to retrieve it with info() is not the
> best choice of the interface, IMHO. 

I agree that it's not the best choice.  but this is also exactly the same as
the C interface:

struct command_struct {
    /** Name of this command */
    const char *name;
    /** The function to be called when this directive is parsed */
    cmd_func func;
    /** Extra data, for functions which implement multiple commands... */
    void *cmd_data;

so the arguments required when setting up a directive have the same name as
the structure elements, and the interface when retrieving them is the same
as the C interface.  and all of this is exactly like it was in mp1 where
there is lots of documentation explaining it.

> I think the key and the retrieving
> function  need to match. If you want it to be 'info', then it should be
> 'info' in both places.

for the record, we've had this discussion before and it's no surprise that
we came out on the exact same sides as we are now :)

  http://marc.theaimsgroup.com/?t=105409005700004&r=1&w=2

I still like the idea that the accessors match the structure slot names.  I
also think changing it at this point makes less sense - not that we can't
change things now, but that directive handlers are confusing enough without
going against both how Apache itself represents things and all of the
existing documentation for mp1 wrt the accessor names.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to