lua接受C++返回值

   前几天工作的时候同事莫名其妙 返回NULL和返回0在lua中有区别(VS下 NULL==0)

    if (not c_plus_plus:GetValue())   //奇怪的是  返回NULL进入了if,返回0并没有

     答案:返回NULL后 lua会默认为 为 nil (lua中只有 nil 和 false 为假)

posted @ 2014-10-29 22:03  落雪成冰  阅读(358)  评论(0编辑  收藏  举报