Re: namespace clashing with GraphicsMagick

Charlie Reitzel <[email protected]> Fri, 24 Mar 2006 10:47:40 -0500
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
GetToken() is not part of the TidyLib public API.  Your application should 
only include headers from the /tidy/include subdirectory, never 
/tidy/src.  This separation was made precisely to prevent this sort of name 
collision.

If you choose to work with the internal API, then you are responsible for 
dealing with any resulting collisions.

At 10:44 AM 3/24/2006 +0100, you wrote:
>Hi,
>
>I've been struggling with a segfault I was getting when using tidy in a Rails
>application, and after hours of gdb, I finally got to the point where I found
>out that both libtidy.so and libGraphicsMagic.so export a GetToken symbol.
>
>After reading some of the source code of tidy, I find it strange that it's
>called GetToken and not TidyGetToken. I renamed it in the few files where
>it's used and now all is working well.
>
>I've also discovered that GraphicsMagic has a --enable-symbol-prefix which
>adds Gm at the beginning of all it's exported symbol, which I used to
>recompile it, so, I should not have that problem anymore. Although, in order
>to prevent others to step into that weird problem, I think that if it's not
>too much a headache, the GetToken in tidy should be prefixed with "Tidy".
>
>Regards,
>
>--
>Mathieu Arnold
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by xPML, a groundbreaking scripting language
>that extends applications into web and mobile media. Attend the live webcast
>and join the prime developer group breaking into this new coding territory!
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>_______________________________________________
>Tidy-develop mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/tidy-develop



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642