change sq_getpstring to sq_getstringandsize
This commit is contained in:
parent
656c6a0d68
commit
0961039dd7
@ -156,12 +156,6 @@ typedef struct tagSQObject
|
||||
SQObjectValue _unVal;
|
||||
}SQObject;
|
||||
|
||||
typedef struct tagSQPString
|
||||
{
|
||||
SQInteger len;
|
||||
SQChar* str;
|
||||
} SQPString;
|
||||
|
||||
typedef struct tagSQMemberHandle{
|
||||
SQBool _static;
|
||||
SQInteger _index;
|
||||
@ -264,8 +258,8 @@ SQUIRREL_API SQRESULT sq_getbase(HSQUIRRELVM v,SQInteger idx);
|
||||
SQUIRREL_API SQBool sq_instanceof(HSQUIRRELVM v);
|
||||
SQUIRREL_API SQRESULT sq_tostring(HSQUIRRELVM v,SQInteger idx);
|
||||
SQUIRREL_API void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool *b);
|
||||
SQUIRREL_API SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger *size);
|
||||
SQUIRREL_API SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c);
|
||||
SQUIRREL_API SQRESULT sq_getpstring(HSQUIRRELVM v,SQInteger idx,SQPString *pstr);
|
||||
SQUIRREL_API SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i);
|
||||
SQUIRREL_API SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f);
|
||||
SQUIRREL_API SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *b);
|
||||
|
@ -680,12 +680,12 @@ SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *b)
|
||||
return SQ_ERROR;
|
||||
}
|
||||
|
||||
SQRESULT sq_getpstring(HSQUIRRELVM v,SQInteger idx,SQPString *pstr)
|
||||
SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger *size)
|
||||
{
|
||||
SQObjectPtr *o = NULL;
|
||||
_GETSAFE_OBJ(v, idx, OT_STRING,o);
|
||||
pstr->len = _stringlen(*o);
|
||||
pstr->str = _stringval(*o);
|
||||
*c = _stringval(*o);
|
||||
*size = _stringlen(*o);
|
||||
return SQ_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user