Skip to content

Commit

Permalink
RMLUI_LUA_AS_CXX macro from upstream
Browse files Browse the repository at this point in the history
So we have the option to build against the Lua library built as C++.
  • Loading branch information
slipher committed Jun 17, 2024
1 parent ed72a90 commit d608309
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Include/RmlUi/Lua/IncludeLua.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* For the latest information, see http://github.com/mikke89/RmlUi
*
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
* Copyright (c) 2019 The RmlUi Team, and contributors
* Copyright (c) 2019-2023 The RmlUi Team, and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -15,7 +15,7 @@
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -25,15 +25,21 @@
* THE SOFTWARE.
*
*/

#ifndef RMLUI_LUA_INCLUDELUA_H
#define RMLUI_LUA_INCLUDELUA_H
#define RMLUI_LUA_INCLUDELUA_H

//The standard Lua headers
#ifndef RMLUI_LUA_AS_CXX
extern "C" {
#include <lua.h>
#endif

// The standard Lua headers
#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>

#ifndef RMLUI_LUA_AS_CXX
}
#endif

#endif

0 comments on commit d608309

Please sign in to comment.