From 9004743fc43d7cfc133aa20a575bf961b2068429 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 15 May 2016 01:00:47 -0500 Subject: [PATCH] docs for sq_getstringandssize --- .../api/object_creation_and_handling.rst | 15 +++++++++++++++ doc/source/reference/embedding/the_stack.rst | 1 + 2 files changed, 16 insertions(+) diff --git a/doc/source/reference/api/object_creation_and_handling.rst b/doc/source/reference/api/object_creation_and_handling.rst index bc9bdad..9cc60d2 100644 --- a/doc/source/reference/api/object_creation_and_handling.rst +++ b/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) diff --git a/doc/source/reference/embedding/the_stack.rst b/doc/source/reference/embedding/the_stack.rst index 5355e8f..9c5f9ae 100644 --- a/doc/source/reference/embedding/the_stack.rst +++ b/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);