feat: Switch from default sq stack parsing to NoNut
This commit is contained in:
@@ -13,6 +13,7 @@ namespace nonut
|
||||
public:
|
||||
static void registerFunction(String funcName, const SQFUNCTION func, size_t funcSize)
|
||||
{
|
||||
HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
|
||||
const auto top = sq_gettop(vm);
|
||||
sq_pushroottable(vm);
|
||||
sq_pushstring(vm, funcName.c_str(), funcName.length());
|
||||
|
||||
@@ -15,7 +15,4 @@ namespace nonut
|
||||
constexpr SQObject SQ_NULL{ OT_NULL };
|
||||
}
|
||||
|
||||
namespace nonut::g2o{}
|
||||
namespace g2o = nonut::g2o;
|
||||
|
||||
#endif // CORE_COMMONHEADER_H_
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef NONUT_CORE_USER_DATA_H
|
||||
#define NONUT_CORE_USER_DATA_H
|
||||
|
||||
#include <sqapi.h>
|
||||
|
||||
namespace nonut
|
||||
{
|
||||
class UserData
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace nonut
|
||||
std::is_same_v<T, Bool*> ||
|
||||
std::is_same_v<T, Int*> ||
|
||||
std::is_same_v<T, Float*> ||
|
||||
std::is_same_v<T, SQChar**> ||
|
||||
std::is_same_v<T, const SQChar**> ||
|
||||
std::is_same_v<T, HSQOBJECT*> ||
|
||||
std::is_same_v<T, SQUserPointer*>,
|
||||
"Not supported return type");
|
||||
@@ -29,7 +29,7 @@ namespace nonut
|
||||
sq_getinteger(vm, idx, outPtr);
|
||||
if constexpr (std::is_same_v<T, Float*>)
|
||||
sq_getfloat(vm, idx, outPtr);
|
||||
if constexpr (std::is_same_v<T, SQChar**>)
|
||||
if constexpr (std::is_same_v<T, const SQChar**>)
|
||||
sq_getstring(vm, idx, outPtr);
|
||||
if constexpr (std::is_same_v<T, HSQOBJECT*>)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user