in reply to Re: XS replacing my c library, not compatible with OS threads
in thread XS replacing my c library, not compatible with OS threads
Whilst mismatched C runtime libraries is certainly an issue with building XS extensions for use with binary distributions, it is far from being the predominant problem.
The single biggest problem is trying to work out what actually gets called when you use an *alloc call. There are so many #defines, #undefs, wrapper-functions and dispatch tables that conditionally define and redefine each of these calls, that you need to be a compiler to work out what actually gets called. And with so many levels of indirection and macro redefinition, setting breakpoints within a debugger is almost impossible.
And as the OP indicated, even if you use the compiler /E switch (or equivalent) to view the post preprocessor output, what you get is so complicated--a simple char *p = malloc( 10 ); decoding to several hundred bytes of tortuously nested, and often duplicated) function calls, casts and parens--that it is still essentially unintelligible.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XS replacing my c library, not compatible with OS threads
by Corion (Patriarch) on Dec 01, 2010 at 10:28 UTC | |
by BrowserUk (Patriarch) on Dec 01, 2010 at 11:08 UTC |