lean2/src/cmake/Modules/CheckLuaNewstate.cc
Leonardo de Moura 183080294b fix(cmake/Modules/CheckLuaNewstate.cc): compilation problem on cygwin
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-09 12:18:20 -08:00

20 lines
501 B
C++

/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <iostream>
#include <memory>
#include <cstdlib>
#include <lua.hpp>
static void * lua_realloc(void *, void * q, size_t, size_t sz) { return realloc(q, sz); }
// Little program for checking whether lua_newstate is available
int main() {
lua_State * L;
L = lua_newstate(lua_realloc, 0);
lua_close(L);
return 0;
}