in reply to Passing NULL pointer through XS without "Use of uninitialized value in subroutine entry"

Does it help if you change your code to not pass a reference to undef, but instead just pass undef?

   my $bar = Foo::create_bar($foo);

That seems like a more straight-forward representation of C's NULL to me.

-sam

  • Comment on Re: Passing NULL pointer through XS without "Use of uninitialized value in subroutine entry"
  • Download Code

Replies are listed 'Best First'.
Re^2: Passing NULL pointer through XS without "Use of uninitialized value in subroutine entry"
by kscaldef (Pilgrim) on Aug 21, 2006 at 23:34 UTC
    If I do that, with no other changes, I get the error: "create_bar() -- foo is not an SV reference".