|
Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicin: msg#00021web.html-tidy.devel
>> 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 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure): 00021, Jeff Pohlmeyer |
|---|---|
| Next by Date: | Re: Joining class names: 00021, Charlie Reitzel |
| Previous by Thread: | Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure)i: 00021, Jeff Pohlmeyer |
| Next by Thread: | Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure): 00021, Charlie Reitzel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |