BYVoid / uchardet

An encoding detector library ported from Mozilla
Other
605 stars 106 forks source link

Header conformance fixes #8

Closed ghost closed 9 years ago

ghost commented 9 years ago

Identifiers starting with __ are reserved for the system - user code (including non-system libraries) must not define them.

A function which takes no parameters is declared with "(void)". In C, an empty parameter list means that any number of parameters with unspecified types is allowed, which is not what we want in this case. Another reason to fix this is that compilers often warn if this legacy feature is used, which is bothersome for API users.

Additionally, use an opaque struct as underlying type for uchardet_t. This facilitates type-checking, as it's harder to confuse with other types, especially in C. This is not strictly a conformance issue, but still a nice change. Note that this is neither an API or an ABI change.