Skip to content

Commit

Permalink
Fix the lua 5.3.5 build and move a noreturn attribute in lobjectivec_…
Browse files Browse the repository at this point in the history
…exceptions to the .h file because otherwise Xcode complains that gcc couldn't compile it, as if that is something we would ever want to do
  • Loading branch information
cmsj committed Jul 10, 2018
1 parent ba639e0 commit b01613e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions LuaSkin/LuaSkin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

/* Begin PBXBuildFile section */
4F04557E20F509EC00699F29 /* lobjectivec_exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F478F0A1DE6251400E0DC38 /* lobjectivec_exceptions.h */; };
4F04557F20F509FE00699F29 /* lobjectivec_exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F478F0A1DE6251400E0DC38 /* lobjectivec_exceptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
4F0455BE20F50C7500699F29 /* lapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 4F0455A720F50C5000699F29 /* lapi.c */; };
4F0455BF20F50C7500699F29 /* lauxlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 4F0455B920F50C5200699F29 /* lauxlib.c */; };
4F0455C020F50C7500699F29 /* lbaselib.c in Sources */ = {isa = PBXBuildFile; fileRef = 4F04558620F50C4D00699F29 /* lbaselib.c */; };
Expand Down Expand Up @@ -366,7 +365,6 @@
4F0455FE20F50C9300699F29 /* ldo.h in Headers */,
4F04560720F50C9300699F29 /* lprefix.h in Headers */,
4F04560A20F50C9300699F29 /* ltable.h in Headers */,
4F04557F20F509FE00699F29 /* lobjectivec_exceptions.h in Headers */,
4F04560420F50C9300699F29 /* lobject.h in Headers */,
4F0455FC20F50C9300699F29 /* lctype.h in Headers */,
4F04561020F50C9300699F29 /* lvm.h in Headers */,
Expand Down
2 changes: 1 addition & 1 deletion LuaSkin/LuaSkin/lobjectivec_exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct lua_longjmp {
volatile int status; /* error code */
};

LUAI_FUNC void luai_objcthrow(struct lua_longjmp* errorJmp);
LUAI_FUNC void luai_objcthrow(struct lua_longjmp* errorJmp) __attribute__((noreturn));

/* Throw is moved into a real function instead of a macro because NSException is needed
* which brings in #imports from Foundation which polutes the namespace
Expand Down
2 changes: 1 addition & 1 deletion LuaSkin/LuaSkin/lobjectivec_exceptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void luai_objcttry(lua_State* L, struct lua_longjmp* c_lua_longjmp, Pfunc a_func
}
}

void luai_objcthrow(__unused struct lua_longjmp* errorJmp) __attribute__((noreturn))
void luai_objcthrow(__unused struct lua_longjmp* errorJmp)
{
// This must not be autoreleased because Lua doesn't have its own autorelease pool. (See Optimization Notes at the top).
// To be nice to ARC, I moved to a static NSString away from a custom NSObject that I made sure never got autoreleased.
Expand Down

0 comments on commit b01613e

Please sign in to comment.