tidy API design problem

Robert Marquardt <[email protected]> Mon, 01 Jan 2007 18:42:30 +0100
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
The problem stems from the #if for the elements of enum TidyOptionId.
Depending on the #if's the enum has a varying number of elements so
the elements after the #if's can have different ordinal values.

This is very bad if tidy is compiled as .so or .dll. It is then
possible to use tidyenum.h/tidy.h with a different #if setting than
the .so or .dll was compiled with. The result is that all API
functions using TidyOptionId parameters become unreliable.

There are two possible solutions:

Remove the #if (SUPPORT_ASIAN_ENCODINGS and SUPPORT_UTF16_ENCODINGS)
from the sources. A quick glance showed no real problems with
activating these #if's permanently.

Alternatively give the elements of TidyOptionId explicit values.

I have logged this as RequestID 1625617 in the bugtracker also.
-- 
Robert Marquardt (Team JEDI)  http://delphi-jedi.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV