From 4934b44c0b2e94395b15dd642570c51e5e484664 Mon Sep 17 00:00:00 2001 From: Patrix Date: Thu, 22 Apr 2021 16:13:49 +0200 Subject: [PATCH] Fixed compile error on gcc: renamed 'typeof' function pointer in HSQAPI to 'type_of' to avoid naming collision (gcc implements it's own typeof keyword) https://gcc.gnu.org/onlinedocs/gcc/Typeof.html --- dependencies/sqrat/include/sqmodule.h | 2 +- src/api/squirrel_api.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies/sqrat/include/sqmodule.h b/dependencies/sqrat/include/sqmodule.h index 2fc19aa..4633432 100644 --- a/dependencies/sqrat/include/sqmodule.h +++ b/dependencies/sqrat/include/sqmodule.h @@ -205,7 +205,7 @@ extern "C" { SQRESULT (*setclosureroot)(HSQUIRRELVM v, SQInteger idx); SQRESULT (*getclosureroot)(HSQUIRRELVM v, SQInteger idx); void (*pushthread)(HSQUIRRELVM v, HSQUIRRELVM thread); - SQRESULT (*typeof)(HSQUIRRELVM v, SQInteger idx); + SQRESULT (*type_of)(HSQUIRRELVM v, SQInteger idx); SQHash (*gethash)(HSQUIRRELVM v, SQInteger idx); SQRELEASEHOOK (*getreleasehook)(HSQUIRRELVM v, SQInteger idx); SQRESULT (*getfunctioninfo)(HSQUIRRELVM v, SQInteger level, SQFunctionInfo* fi); diff --git a/src/api/squirrel_api.h b/src/api/squirrel_api.h index b38aef8..5a03c47 100644 --- a/src/api/squirrel_api.h +++ b/src/api/squirrel_api.h @@ -58,7 +58,7 @@ #define sq_pushnull SqModule::api->pushnull #define sq_pushthread SqModule::api->pushthread #define sq_gettype SqModule::api->gettype -#define sq_typeof SqModule::api->typeof +#define sq_typeof SqModule::api->type_of #define sq_getsize SqModule::api->getsize #define sq_gethash SqModule::api->gethash #define sq_getbase SqModule::api->getbase