SPVM::D...ariable(3)
π Name π
okay so bestie, this is SPVM::Document::NativeAPI::ClassVariable β Class Variable Native APIs β and the manual-page header shows it as SPVM::D...ariable(3). It's chillin' under the User Contributed Perl Documentation umbrella, and it's literally all about the native APIs that get definition info for class variables. slay.
πΈ Description πΈ
The class variable native APIs in SPVM are the APIs to get definition information for class variables. that's the whole vibe. no cap.
π Usage π
here's the group-chat demo of how you use them β grab the class-var API table, get a basic type, look up a class variable by name, then read its name:
SPVM_API_CLASS_VAR* api_class_var = env->api->class_var;
void* basic_type = env->get_basic_type(env, stack, "Foo");
void* class_var = env->api->basic_type->get_class_var_by_name(env->runtime, basic_type, "$VAR");
const char* class_var_name = api_class_var->get_name(env->runtime, class_var);
π Native APIs π
get_name
const char* (*get_name)(void* runtime, void* class_var);
Returns the name of the class variable class_var. iconic little name-getter behavior π
get_index
int32_t (*get_index)(void* runtime, void* class_var);
Returns the index of the class variable class_var. This index is the position of the class variable in its belonging class. it's giving "where do you sit in class" energy π
get_basic_type
void* (*get_basic_type)(void* runtime, void* class_var);
Returns the basic type of the class variable class_var. basic type reveal β¨
get_type_dimension
int32_t (*get_type_dimension)(void* runtime, void* class_var);
Returns the type dimension of the class variable class_var. dimension check, bestie π
get_type_flag
int32_t (*get_type_flag)(void* runtime, void* class_var);
Returns the type flag ID of the class variable class_var. flag ID, iykyk π₯
get_current_basic_type
void* (*get_current_basic_type)(void* runtime, void* class_var);
Returns the basic type that owns the class variable class_var. the owner said "this is my variable" π
is_cache
int32_t (*is_cache)(void* runtime, void* class_var);
If "cache" class variable attribute is specified, returns 1, otherwise returns 0. cache check, periodt π«Ά
π₯ Native API IDs π₯
0βget_name1βget_index2βget_basic_type3βget_type_dimension4βget_type_flag5βget_current_basic_type6βis_cache
π¦ See Also π¦
SPVM::Document::NativeAPISPVM::Document::NativeClassSPVM::Document
go read these too, bestie β the lore is connected π
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
and that's the whole page, babe π β brought to you by perl v5.42.2, dated 2026-02-03, and signed at the bottom as SPVM::D...ariable(3). mwah πβ¨
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms