Name
SPVM::Document::NativeAPI::ModuleFile - Module File Native APIs
Description
The module file native APIs of SPVM are the APIs to manipulate module files.
Usage
void* module_file = env->api->compiler->get_module_file(compiler, "MyClass");
const char* module_name = env->api->module_file->get_module_name(compiler, module_file);
Native APIs
get_module_name
const char* (*get_module_name)(void* compiler, void* module_file);
Returns the module name.
get_file
const char* (*get_file)(void* compiler, void* module_file);
Returns the file.
set_file
void (*set_file)(void* compiler, void* module_file, const char* file);
Sets a file.
get_dir
const char* (*get_dir)(void* compiler, void* module_file);
Returns the directory.
set_dir
void (*set_dir)(void* compiler, void* module_file, const char* dir);
Sets a directory.
get_rel_file
const char* (*get_rel_file)(void* compiler, void* module_file);
Returns the relative file.
set_rel_file
void (*set_rel_file)(void* compiler, void* module_file, const char* rel_file);
Sets a relative file.
get_content
const char* (*get_content)(void* compiler, void* module_file);
Returns the content.
set_content
void (*set_content)(void* compiler, void* module_file, const char* content);
Sets a content.
get_content_length
int32_t (*get_content_length)(void* compiler, void* module_file);
Returns the length of the content.
set_content_length
void (*set_content_length)(void* compiler, void* module_file, int32_t content_length);
Sets the length of a content.
Native API IDs
0 get_module_name
1 get_file
2 set_file
3 get_dir
4 set_dir
5 get_rel_file
6 set_rel_file
7 get_content
8 set_content
9 get_content_length
10 set_content_length
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License