SPVM::D...::Field(3)
π SPVM::Document::NativeAPI::Field
okay so the manual name is SPVM::Document::NativeAPI::Field and honestly? it's giving "the field native API cheat sheet" and I'm obsessed. π this is the SPVM::D...::Field(3) page, bestie, so buckle up.
β¨ Name β¨
SPVM::Document::NativeAPI::Field β Field Native APIs π
πΈ Description πΈ
The field native APIs in SPVM are, literally, the APIs you use to get definition information for fields. that's it, that's the vibe. π¦
π§ Usage π§
here's what it looks like in the wild, no cap:
SPVM_API_FIELD* api_field = env->api->field;
void* basic_type = env->get_basic_type(env, stack, "Foo");
void* field = env->api->basic_type->get_field_by_name(env->runtime, basic_type, "value");
const char* field_name = api_field->get_name(env->runtime, field);
likeβ¦ look at her go. main character energy fr fr. π
π Native APIs π
okay this is the good part. every single one of these takes a void* runtime and a void* field, and they all return something with a very specific type. do not mix them up. π
β get_name
const char* (*get_name)(void* runtime, void* field);
Returns the name of the field field. yup. just the name. she's simple like that. π
β get_index
int32_t (*get_index)(void* runtime, void* field);
Returns the index of the field field. π’
β get_offset
int32_t (*get_offset)(void* runtime, void* field);
Returns the byte offset of the field field. and like, quick PSA β the byte offset is the position in bytes where the field is allocated in its belonging class. that's the whole definition, so don't come for me. π
β get_basic_type
void* (*get_basic_type)(void* runtime, void* field);
Returns the basic type of the field field. π¦
β get_type_dimension
int32_t (*get_type_dimension)(void* runtime, void* field);
Returns the type dimension of the field field. like how many layers of array vibe it's got. β¨
β get_type_flag
int32_t (*get_type_flag)(void* runtime, void* field);
Returns the type flag ID of the field field. π©
β get_current_basic_type
void* (*get_current_basic_type)(void* runtime, void* field);
Returns the basic type that owns the field field. she's the one holding the leash. π
β get_exists_offset
int32_t (*get_exists_offset)(void* runtime, void* field);
Returns the byte offset of the exists flag of the field field. π
β get_exists_bit
int32_t (*get_exists_bit)(void* runtime, void* field);
Return the bit shift of the exists flag of the field field. (yes, singular "return", that's how the page says it, I'm just the messenger π)
π₯ Native API IDs π₯
like the group chat roster β here's who's who, index by index:
0βget_name1βget_index2βget_offset3βget_basic_type4βget_type_dimension5βget_type_flag6βget_current_basic_type7βget_exists_offset8βget_exists_bit
π¦ See Also π¦
SPVM::Document::NativeAPISPVM::Document::NativeClassSPVM::Document
go read them. all of them. iykyk. π
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License π
okay bestie that's the whole page, go forth and get those field definitions π
mwah π β this was perl v5.42.2, dated 2026-02-03, signing off from the SPVM::D...::Field(3) page. periodt. β¨
π¦ 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