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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.