SPVM::D...PI::Type(3)
NAME β¨
SPVM::Document::NativeAPI::Type β Type Native APIs.
okay bestie, welcome to the SPVM::D...PI::Type(3) page, which lives in the User Contributed Perl Documentation. The full module name is SPVM::Document::NativeAPI::Type, and it is literally the manual for the Type Native APIs. main character energy fr fr. π
Description π¦
The type native APIs in SPVM are the APIs that get type information. That is the whole assignment, no cap. β¨
Usage π«Ά
you get to them like this, bestie:
SPVM_API_TYPE* api_type = env->api->type;
and that is the vibe check for the entry point. π
Native APIs π
okay so here is every native API, in order, with the exact signature. periodt. π
can_assign
int32_t (*can_assign)(void* runtime, void* dist_basic_type, int32_t dist_type_dimension, int32_t dist_type_flag, void* src_basic_type, int32_t src_type_dimension, int32_t src_type_flag);
If the source type given by src_basic_type, src_type_dimension, and src_type_flag can be assigned to the dist type given by dist_basic_type, dist_type_dimension, and dist_type_flag, it returns 1; otherwise it returns 0. that is it, that is the whole function. no cap. π
get_type_width
int32_t (*get_type_width)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
Returns the type width of the type given by basic_type, type_dimension, and type_flag. iconic. πβ¨
is_object_type
int32_t (*is_object_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
If the type given by basic_type, type_dimension, and type_flag is an object type, it returns 1; otherwise it returns 0. slay. π¦
is_any_object_type
int32_t (*is_any_object_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
If the type given by basic_type, type_dimension, and type_flag is the any object type object, it returns 1; otherwise it returns 0. iykyk. π
is_object_array_type
int32_t (*is_object_array_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
If the type given by basic_type, type_dimension, and type_flag is an object array type, it returns 1; otherwise it returns 0. π
is_any_object_array_type
int32_t (*is_any_object_array_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
If the type given by basic_type, type_dimension, and type_flag is any object array type object[], it returns 1; otherwise it returns 0. obsessed. πΈ
is_numeric_type
int32_t (*is_numeric_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
If the type given by basic_type, type_dimension, and type_flag is a numeric type, it returns 1; otherwise it returns 0. π₯
is_class_type
int32_t (*is_class_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t type_flag);
If the type given by basic_type, type_dimension, and type_flag is a class type, it returns 1; otherwise it returns 0. π
Native API IDs π
the IDs are literally:
0 can_assign
1 get_type_width
2 is_object_type
3 is_any_object_type
4 is_object_array_type
5 is_any_object_array_type
6 is_numeric_type
6 is_class_type
yes bestie, 6 appears twice in the original list (is_numeric_type and is_class_type) β I am keeping it exactly like that, no edits, fr fr. π
See Also π
go read these next, bestie β they are the linked lore:
SPVM::Document::NativeAPISPVM::Document::NativeAPI::BasicTypeSPVM::Document::NativeClassSPVM::Document
Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
kiss kiss, this page is from perl v5.42.2, dated 2026-02-03, and its footer title is SPVM::D...PI::Type(3). bye bestie, go get that type info ππβ¨
π¦ 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