소스 검색

Allow NativeFunctions to be pushed onto the stack

Ole 9 년 전
부모
커밋
272071ccfd
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      lib/luwra/functions.hpp

+ 5 - 0
lib/luwra/functions.hpp

@@ -77,6 +77,11 @@ struct Value<NativeFunction<R>> {
 		luaL_checktype(state, index, LUA_TFUNCTION);
 		return {state, index};
 	}
+
+	static inline
+	size_t push(State* state, const NativeFunction<R>& func) {
+		return Value<Reference>::push(state, func);
+	}
 };
 
 LUWRA_NS_END