Esempio n. 1
0
	inline void type_assert(lua_State* L, int index, type expected) {
		type actual = type_of(L, index);
		type_assert(L, index, expected, actual);
	}
Esempio n. 2
0
void ffi_set_address(OBJECT ptr, void *addr) {
  type_assert(ptr, MemPtrType, "passing a pointer");
  *DATA_STRUCT(ptr, void**) = addr;
}
Esempio n. 3
0
		thread(lua_State* L, int index = -1) : reference(L, index) {
#ifdef SOL_CHECK_ARGUMENTS
			type_assert(L, index, type::thread);
#endif // Safety
		}
Esempio n. 4
0
void ffi_autorelease(OBJECT ptr, int ar) {
  type_assert(ptr, MemPtrType, "passing a pointer");
  ptr->RequiresCleanup = (ar ? 1 : 0);
}