Skip to content

Commit 29735f6

Browse files
committed
RMLUI_LUA_AS_CXX macro from upstream
So we have the option to build against the Lua library built as C++.
1 parent ed72a90 commit 29735f6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Include/RmlUi/Lua/IncludeLua.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* For the latest information, see http://github.com/mikke89/RmlUi
55
*
66
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
7-
* Copyright (c) 2019 The RmlUi Team, and contributors
7+
* Copyright (c) 2019-2023 The RmlUi Team, and contributors
88
*
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal
@@ -15,7 +15,7 @@
1515
*
1616
* The above copyright notice and this permission notice shall be included in
1717
* all copies or substantial portions of the Software.
18-
*
18+
*
1919
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2020
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2121
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,15 +25,21 @@
2525
* THE SOFTWARE.
2626
*
2727
*/
28-
28+
2929
#ifndef RMLUI_LUA_INCLUDELUA_H
30-
#define RMLUI_LUA_INCLUDELUA_H
30+
#define RMLUI_LUA_INCLUDELUA_H
3131

32-
//The standard Lua headers
32+
#ifndef RMLUI_LUA_AS_CXX
3333
extern "C" {
34-
#include <lua.h>
34+
#endif
35+
36+
// The standard Lua headers
3537
#include <lauxlib.h>
38+
#include <lua.h>
3639
#include <lualib.h>
40+
41+
#ifndef RMLUI_LUA_AS_CXX
3742
}
43+
#endif
3844

3945
#endif

0 commit comments

Comments
 (0)