Simple Virtual Machine
A simple but flexible virtual machine
SVM_String Struct Reference

#include <svm.h>

Data Fields

const char * string
 The memory buffer associated to this string is always held by the SVM when it has been returned from an API function. More...
 
SVM_Size size
 

Field Documentation

◆ size

SVM_Size SVM_String::size

◆ string

const char* SVM_String::string

The memory buffer associated to this string is always held by the SVM when it has been returned from an API function.

Warning
NEVER FREE OR DELETE A STRING BUFFER RETURNED BY THE SVM. This buffer will be freed/deleted when it is not longer useful.
Note
Under some circonstancies, an extra null byte is added after the buffer size to be compatible with C strings.
Warning
As no buffer underflow or overflow checks are done on the buffer of the string, doing a read or a write outside the buffer will result in an undefined behavior.

The documentation for this struct was generated from the following file: