I'm surprised that undefs wouldn't become NULL; that's the behavior I'd want too.
The way I'm seeing it, the behaviour you want is not happening because of perl's default typemap.
But if that's a bug, it's a Perl bug not an Inline::C bug.
At least Inline::C provides the rope for one to change that behaviour.