Re: Nil and NULL

  • From: Mike Pall <mike-1208@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 5 Aug 2012 18:39:18 +0200

QuentinC wrote:
> Would it be possible to do so that cdata pointers pointing to NULL
> gets translated in lua either to actual nil, or at least be
> interpreted as being false in a if/while statement ?

No. This causes unnecessary overhead and would imply dropping the
pointer type.

> Notice also that there isn't any simple way to check the nullity:

if result == nil then ... end

--Mike

Other related posts: