Simple Virtual Machine
A simple but flexible virtual machine
|
This module contains API functions to handle variables. More...
Modules | |
SVM variables scope | |
This module contains API functions to handle the scope of variables. | |
SVM variables detection | |
This module contains API functions to detect variable types. | |
Functions | |
SVM_FUNCTION SVM_Variable * | svm_variable_array_new (const void *svm, SVM_Size size) |
This function creates an array of variables. More... | |
SVM_FUNCTION void | svm_variable_delete (const void *svm, const SVM_Variable variable) |
This function alters the scope of the given variable. More... | |
This module contains API functions to handle variables.
A variable in this API refers to a generic pointer used as a key associated to an object internally managed by the virtual machine.
There are two ways to obtain a variable:
The scope of a variable can be:
The scope of the object associated to a variable can be different when:
Variables are equally comparable: Two variables being equal refer to the same associated object:
SVM_FUNCTION SVM_Variable * svm_variable_array_new | ( | const void * | svm, |
SVM_Size | size | ||
) |
This function creates an array of variables.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | size | The size of the array. |
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
SVM_FUNCTION void svm_variable_delete | ( | const void * | svm, |
const SVM_Variable | variable | ||
) |
This function alters the scope of the given variable.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | variable | The variable to free. |
This variable becomes immediately invisible.
The object associated to this variable may be deleted immediately.
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |