Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#1935) client option change callback
Home

[Freeciv-Dev] Re: (PR#1935) client option change callback

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#1935) client option change callback
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 7 Nov 2002 12:33:51 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Per I. Mathisen via RT wrote:
> Why is the argument to the new callback a client_options struct, and not
> just a simple string?

Why not?  Passing the full struct pointer takes minimal overhead.  In 
some cases it would allow the same function to be used as callback for 
multiple options.  In most cases it won't matter at all.

Ahh, but the real reason is: the change callback can be used for either 
COT_BOOL, COT_INT, or COT_STRING.  So passing a single value (unless 
it's a void* and we let the callback figure it out) won't work.

jason




[Prev in Thread] Current Thread [Next in Thread]