Well ... Inline::C is, in the final analysis, nothing other than XS.
Of course it sits on top of XS, but so does any other tool that has to reach out to C/C++ (and for this matter any other language e.g.: Java's JNI). SWIG is a case in point which does that for a plethora of languages: but it's not just XS, or JNI, or Python's C extensions: it's all those things packaged in a coherent way with extensive documentation attached; which is really all I want when I am doing Perl, because if I am doing Perl I want to stay away from XS/C as much as possible.
The same thing with a compiler tool-chain: sits on top of many tools and low level languages, but it's not just assembly or machine code.
So, we are talking about two different levels of abstraction: tools like Inline::C which conveniently hide the low level details and sits in the middle, should hopefully provide support for the most common use cases and provide extension points for the uncommon cases.
If we agree that NULL pointers are a common feature of the C libraries, than I would expect transparent support for those by default.
I'm pretty surprised that this never came up before given the widespread use of NULLs in C code...or maybe people just gave up (see next point).
... Inline::C already does that by providing us with the TYPEMAPS configuration option ... we can fix that using our own custom typemap.
Right, it could even be just a matter of a new module which install an extra typemap definition borrowed from the SWIG's one...if only that was doable in a reasonable manner: as your extensive analysis has showed in different part of the thread, it seems the original author was drunk when wrote the logic behind the whole "local typemap" option :P.
There are at least two bugs resulting in weird interactions when one tries to extend the very simple Perl default typemap to "override" something:
probably people instead used SWIG to handle NULL pointers.
In reply to Re^7: Inline::C and NULL pointers
by markong
in thread Inline::C and NULL pointers
by markong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |