Procházet zdrojové kódy

docs for sq_getstringandssize

zeromus před 9 roky
rodič
revize
9004743fc4

+ 15 - 0
doc/source/reference/api/object_creation_and_handling.rst

@@ -243,6 +243,21 @@ gets a pointer to the string at the idx position in the stack.
 
 
 
+.. _sq_getstringandsize:
+
+.. c:function:: SQRESULT sq_getstringandsize(HSQUIRRELVM v, SQInteger idx, const SQChar ** c, SQInteger* size)
+
+    :param HSQUIRRELVM v: the target VM
+    :param SQInteger idx: an index in the stack
+    :param const SQChar ** c: a pointer to the pointer that will point to the string
+    :param SQInteger * size: a pointer to a SQInteger which will receive the size of the string
+    :returns: a SQRESULT
+
+gets a pointer to the string at the idx position in the stack; additionally retrieves its size.
+
+
+
+
 .. _sq_getthread:
 
 .. c:function:: SQRESULT sq_getthread(HSQUIRRELVM v, SQInteger idx, HSQUIRRELVM* v)

+ 1 - 0
doc/source/reference/embedding/the_stack.rst

@@ -92,6 +92,7 @@ the result can be one of the following values: ::
 The following functions convert a squirrel value in the stack to a C value::
 
     SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c);
+    SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger size);
     SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i);
     SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f);
     SQRESULT sq_getuserpointer(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p);