Improve the string retrieval from the stack to make use of the new sq_getstringandsize API function and also obtain the size everytime.

Add two new helper functions to retrieve the string representation of a certain script type or object.
This commit is contained in:
Sandu Liviu Catalin
2016-06-09 02:05:36 +03:00
parent 94fb58cc5d
commit f1d8d60e96
2 changed files with 60 additions and 2 deletions
+10
View File
@@ -1399,6 +1399,16 @@ struct StackStrF
StackStrF & operator = (StackStrF && o) = delete;
};
/* ------------------------------------------------------------------------------------------------
* Netrieve the string representation of a certain type.
*/
CSStr SqTypeName(SQObjectType type);
/* ------------------------------------------------------------------------------------------------
* Netrieve the string representation of a certain type from a value on the stack.
*/
String SqTypeName(HSQUIRRELVM vm, SQInteger idx);
/* ------------------------------------------------------------------------------------------------
* Create a script object from the specified value on the default VM.
*/