SPVM::D...ariable(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸ’… 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_name
  • 1 β€” get_index
  • 2 β€” get_basic_type
  • 3 β€” get_type_dimension
  • 4 β€” get_type_flag
  • 5 β€” get_current_basic_type
  • 6 β€” is_cache

πŸ¦‹ See Also πŸ¦‹

  • SPVM::Document::NativeAPI
  • SPVM::Document::NativeClass
  • SPVM::Document

go read these too, bestie β€” the lore is connected πŸ‘‘


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