> lua_pushcfunction(L, cfunc); > lua_pushcfunction(L, cfunc); > int ret = lua_rawequal(L, -1, -2); > // ret == 0 On the stack there are two *different* closures of the same C function. Hence, two different Lua values.