|
Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicin: msg#00024web.html-tidy.devel
Thanks for the info. LibTidy already has the TIDY_EXPORT macro. Is there a way on GCC to reverse the semantics? I.e. hide everything except that which is expressly exported? At 10:57 PM 6/26/2006 +0100, Nuno Lopes wrote: > >> The problem is: how to "fix" the problem without breaking > >> compatibility with older tidy lib versions? > > > > AFAICT GetToken() is private, so existing client apps > > shouldn't be using it anyway. > >AH, good point Jeff. >static can't be used, because the function is defined in lexer.c, but used >in parser.c > >But.. gcc offers a good alternative: >__attribute__ ((visibility ("internal"))) > >gcc docs: >http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bused_007d-attribute_002e-1876 > >So, I would define a macro, like: >#if defined(__GNUC__) && __GNUC__ >= 3 ># define INTERNAL __attribute__ ((visibility ("internal"))) >#else ># define INTERNAL >#endif > >And use it like: >Node* INTERNAL GetToken( TidyDocImpl* doc, GetTokenMode mode ) { ... } > > >Now, its up with tidy developers to choose what they want to do. > >And "The" reference for writing shared librarys: >http://people.redhat.com/drepper/dsohowto.pdf > > >Nuno > > >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Tidy-develop mailing list >Tidy-develop@xxxxxxxxxxxxxxxxxxxxx >https://lists.sourceforge.net/lists/listinfo/tidy-develop Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure): 00024, Charlie Reitzel |
|---|---|
| Next by Date: | Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure): 00024, Nuno Lopes |
| Previous by Thread: | Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure)i: 00024, Nuno Lopes |
| Next by Thread: | Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure): 00024, Nuno Lopes |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |