Skip to content

Commit 35ff807

Browse files
Bugfix Lua 5.4 not working
1 parent 58ba3fc commit 35ff807

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

third_party/sol2/sol/types.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,9 @@ namespace sol {
568568
runtime = LUA_ERRRUN,
569569
memory = LUA_ERRMEM,
570570
handler = LUA_ERRERR,
571+
#if SOL_LUA_VERSION < 504
571572
gc = LUA_ERRGCMM,
573+
#endif
572574
syntax = LUA_ERRSYNTAX,
573575
file = LUA_ERRFILE,
574576
};
@@ -578,7 +580,9 @@ namespace sol {
578580
yielded = LUA_YIELD,
579581
runtime = LUA_ERRRUN,
580582
memory = LUA_ERRMEM,
583+
#if SOL_LUA_VERSION < 504
581584
gc = LUA_ERRGCMM,
585+
#endif
582586
handler = LUA_ERRERR,
583587
dead = -1,
584588
};
@@ -587,7 +591,9 @@ namespace sol {
587591
ok = LUA_OK,
588592
syntax = LUA_ERRSYNTAX,
589593
memory = LUA_ERRMEM,
594+
#if SOL_LUA_VERSION < 504
590595
gc = LUA_ERRGCMM,
596+
#endif
591597
file = LUA_ERRFILE,
592598
};
593599

@@ -630,8 +636,10 @@ namespace sol {
630636
return names[3];
631637
case call_status::handler:
632638
return names[4];
639+
#if SOL_LUA_VERSION < 504
633640
case call_status::gc:
634641
return names[5];
642+
#endif
635643
case call_status::syntax:
636644
return names[6];
637645
case call_status::file:
@@ -651,7 +659,9 @@ namespace sol {
651659
case call_status::runtime:
652660
case call_status::memory:
653661
case call_status::handler:
662+
#if SOL_LUA_VERSION < 504
654663
case call_status::gc:
664+
#endif
655665
case call_status::syntax:
656666
case call_status::file:
657667
return false;
@@ -672,8 +682,10 @@ namespace sol {
672682
return names[0];
673683
case load_status::memory:
674684
return names[1];
685+
#if SOL_LUA_VERSION < 504
675686
case load_status::gc:
676687
return names[2];
688+
#endif
677689
case load_status::syntax:
678690
return names[3];
679691
case load_status::file:

0 commit comments

Comments
 (0)