SPVM::D...Internal(3)
πΈ Name πΈ
Okay bestie, this is SPVM::Document::NativeAPI::Internal β Internal Native APIs β from the User Contributed Perl Documentation collection. The header does that little SPVM::D...Internal(3) abbreviation thing, but we know the full name π
.
β¨ Description β¨
The internal native APIs in SPVM are the APIs for internal operations. They're used for the implementation of the SPVM language itself, so they should not be used by you, bestie. Like, this is backstage-pass territory, not main-character API energy.
π¨ Real talk: these APIs are for the implementation of the SPVM language, so they should not be used. Periodt.
π«Ά Usage π«Ά
You grab the internal API table from env like this:
SPVM_API_INTERNAL* api_internal = env->api->internal;
π Native APIs π
Here's the function-pointer lineup, one iconic little signature at a time β¨
π get_ref_count π
int32_t (*get_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
Returns the reference count of the object object.
π inc_ref_count π
void (*inc_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
Increments the reference count of the object object.
π dec_ref_count π
void (*dec_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
Decrements the reference count of the object object.
π get_stack_tmp_buffer π
char* (*get_stack_tmp_buffer)(SPVM_ENV* env, SPVM_VALUE* stack);
Returns the temporary buffer on the runtime stack stack.
The byte size of the temporary buffer is SPVM_NATIVE_C_STACK_TMP_BUFFER_SIZE.
Currently, this internal native API is the same as the get_stack_tmp_buffer native API.
π leave_scope_local π
void (*leave_scope_local)(SPVM_ENV* env, SPVM_VALUE* stack, void**
object_vars, int32_t* mortal_stack_typed_var_index, int32_t*
mortal_stack_top_ptr, int32_t* mortal_stack_tops, int32_t
mortal_stack_tops_index);
Performs a leaveing scope operation for local variables given object variables object_vars, the mortal stack mortal_stack, the address of the top of the mortal stack mortal_stack_top_ptr, and the mortal stack tops mortal_stack_tops, and the index of the top of the mortal stack mortal_stack_tops_index.
The value referenced by mortal_stack_top_ptr is updated.
π’ Native API IDs π’
The IDs line up like this, no cap:
0 get_ref_count
1 inc_ref_count
2 dec_ref_count
3 removed3
4 get_stack_tmp_buffer
5 leave_scope_local
π See Also π
SPVM::Document::NativeAPISPVM::Document::NativeClassSPVM::Document
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
That's the whole page, bestie! Footer tea: source/version perl v5.42.2, dated 2026-02-03. Bye ππ¦
π¦ 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