Name
SPVM::Document::NativeAPI::ModuleFile - SPVM Module File Native APIs
Usage
// New module file
void* mdoule_file = env->api->module_file->new_instance(compiler);
Description
SPVM Module File Native APIs are the APIs to manipulate module file.
IDs of Module File Native APIs
Module File native APIs have its IDs.
0 new_env
1 new_instance
2 get_module_name
3 set_module_name
4 get_module_name
5 set_file
6 get_dir
7 set_dir
8 get_rel_file
9 set_rel_file
10 get_content
11 set_content
12 get_content_length
13 set_content_length
Module File Native APIs
new_env
SPVM_ENV_MODULE_FILE* (*new_env)(void);
new_instance
void* (*new_instance)(void* compiler);
get_module_name
const char* (*get_module_name)(void* compiler, void* module_file);
set_module_name
void (*set_module_name)(void* compiler, void* module_file, void* module_name);
set_file
void (*set_file)(void* compiler, void* module_file, void* file);
get_dir
const char* (*get_dir)(void* compiler, void* module_file);
set_dir
void (*set_dir)(void* compiler, void* module_file, void* dir);
get_rel_file
const char* (*get_rel_file)(void* compiler, void* module_file);
set_rel_file
void (*set_rel_file)(void* compiler, void* module_file, void* rel_file);
get_content
const char* (*get_content)(void* compiler, void* module_file);
set_content
void (*set_content)(void* compiler, void* module_file, void* content);
get_content_length
int32_t (*get_content_length)(void* compiler, void* module_file);
set_content_length
void (*set_content_length)(void* compiler, void* module_file, int32_t content_length);
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License