Selene icon indicating copy to clipboard operation
Selene copied to clipboard

Protection for calling null function

Open crosslife opened this issue 11 years ago • 3 comments

eg.

state"null_func"

crosslife avatar Jul 23 '14 02:07 crosslife

Should this be a no-op or should it error? My personal belief is that it should error.

ThePhD avatar Jul 28 '14 05:07 ThePhD

Prefer error or exception for sure. I haven't thought of the ideal way to handle this. It could silently fill an error register in the background and not crash the program but this would require safe usage of the library to check this register after every operation. Undecided as of this moment what the right thing to do is.

jeremyong avatar Jul 28 '14 08:07 jeremyong

I plan on changing all calls to lua_call to lua_pcall nested with appropriate assertions.

jeremyong avatar Aug 04 '14 00:08 jeremyong