SPVM::D...PI::Type(3)

πŸ“¦ version 0.990125, in alpine 3.24

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::NativeAPI
  • SPVM::Document::NativeAPI::BasicType
  • SPVM::Document::NativeClass
  • SPVM::Document

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