SPVM::D...Argument(3)
β¨ Name β¨
SPVM::Document::NativeAPI::Argument β Argument Native APIs. You're on the SPVM::D...Argument(3) page from the User Contributed Perl Documentation, bestie. This one is literally all about the argument native APIs. π«Ά
π Description π
The argument native APIs in SPVM are the APIs to get definition information for arguments. That's the whole assignment β you want the definition info for an argument, and these APIs are the main character. β¨
π Usage π
okay so here's the entire little demo, bestie β do not lose a single character:
SPVM_API_ARG* api_arg = env->api->arg;
SPVM_API_METHOD* api_method = env->api->method;
void* basic_type = env->get_basic_type(env, stack, "Foo");
void* method = env->api->basic_type->get_method_by_name(env->runtime, basic_type, "get");
void* arg = api_method->get_arg_by_index(env->runtime, method, 0);
void* arg_basic_type = api_arg->get_basic_type(env->runtime, arg);
πΈ Native APIs πΈ
get_name
"const char* (*get_name)(void* runtime, void* arg);"
Returns the name of the argument arg. Iconic. π
get_index
"int32_t (*get_index)(void* runtime, void* arg);"
Returns the index of the argument arg. π’
get_basic_type
"void* (*get_basic_type)(void* runtime, void* arg);"
Returns the basic type of the argument arg. π§
get_type_dimension
"int32_t (*get_type_dimension)(void* runtime, void* arg);"
Returns the type dimention of the argument arg β yes, dimension, bestie; that's the original spelling. π
get_type_flag
"int32_t (*get_type_flag)(void* runtime, void* arg);"
Returns the type flag ID of the argument arg. π
get_stack_index
"int32_t (*get_stack_index)(void* runtime, void* arg);"
Returns the stack index of the argument arg. The stack index is the position in a runtime stack. Stack math, but make it cute. π¦
get_current_method
"void* (*get_current_method)(void* runtime, void* arg);"
Returns the method that owns the argument arg. π
is_optional
"int32_t (*is_optional)(void* runtime, void* arg);"
If the argument arg is an optional argument, returns 1, otherwise returns 0. Binary queen. π
get_default_value
"SPVM_VALUE (*get_default_value)(void* runtime, void* arg);"
Returns the default value of the optional argument arg. π
π’ Native API IDs π’
0βget_name1βget_index2βget_basic_type3βget_type_dimension4βget_type_flag5βget_stack_index6βget_current_method7βis_optional8βget_default_value
π See Also π
SPVM::Document::NativeAPISPVM::Document::NativeAPI::MethodSPVM::Document::NativeClassSPVM::Document
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
okay that's the page, bestie! source/version:perl v5.42.2; date:2026-02-03; page:SPVM::D...Argument(3). byeee πβ¨
π¦ 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