Skip to content

Commit f801bf1

Browse files
ziggurat29marcelstoer
authored andcommitted
fixes #2677 minor syntax issues with some dummy variables that bracket the rodata section (#2678)
1 parent 62789da commit f801bf1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/lua/linit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ extern const luaR_entry lua_rotable_base[];
5858
//magic is used; the section names are lexically sorted, so 'a' and 'z' are
5959
//important to keep the other sections lexically between these two dummy
6060
//variables. Check your mapfile output if you need to fiddle with this stuff.
61-
const LOCK_IN_SECTION(A) int _ro_start = 0;
62-
const LOCK_IN_SECTION(zzzzzzzz) int _ro_end = 0;
61+
const LOCK_IN_SECTION(A) char _ro_start[1] = {0};
62+
const LOCK_IN_SECTION(zzzzzzzz) char _ro_end[1] = {0};
6363
#endif
6464
static const LOCK_IN_SECTION(libs) luaL_reg LUA_LIBS[] = {
6565
{"", luaopen_base},

app/lua/lrotable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int luaR_isrotable(void *p);
6666

6767
#if defined(_MSC_VER)
6868
//msvc build uses these dummy vars to locate the beginning and ending addresses of the RO data
69-
extern cons char _ro_start[], _ro_end[];
69+
extern const char _ro_start[], _ro_end[];
7070
#define IN_RODATA_AREA(p) (((const char*)(p)) >= _ro_start && ((const char *)(p)) <= _ro_end)
7171
#else /* one of the POSIX variants */
7272
#if defined(__CYGWIN__)

0 commit comments

Comments
 (0)