cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_setopt() typechecker, try3

From: Michal Marek <mmarek_at_suse.cz>
Date: Mon, 10 Mar 2008 14:31:44 +0100

Hi,

this is basically a repost, as I didn't get further comments on the
prefix issue pointed out by Dan F. The issue is the usage of underscored
macros and identifiers (e.g _curl_is_long()):

Pro: It makes it clear that these are internal macros / identifiers
which shouldn't be used by libcurl applications.
Con: Such names are reserved for the C implementation.

My opinion is that chances that an implementation will use _curl_* for
internal symbols are rather low (plus the typechecker is limited to only
one compiler). Also, libcurl already uses underscored macros as #include
guards (__CURL_CURL_H) and it didn't cause problems so far. Other C
libraries often use underscored identifiers, too (e.g glib). But if
others think that underscores really shouldn't be used here, just speak up.

The attached patch differs from the last one only in naming the helper
macros in a more consistent way (_curl_is_long and _curl_is_long_option
instead of _curl_is_long and _curl_long_option, also pointed out by Dan).

Michal

Received on 2008-03-10