http://qs321.pair.com?node_id=11139780


in reply to Inline::C and NULL pointers

Posts in the rest of this thread suggests you are not wedded to using Inline:C. If this is the case then it is worth having a look at FFI::Platypus.

A search of the FFI::Platypus::Type docs for "NULL pointer" gives a few examples that suggest undefs can be automatically mapped to NULLs.

There are also quite a few modules on CPAN that use FFI::Platypus for these sorts of bindings, so plenty of prior art that can be adapted.