SPVM::D...Argument(3)

πŸ“¦ version 0.990125, in alpine 3.24

✨ 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_name
  • 1 β€” get_index
  • 2 β€” get_basic_type
  • 3 β€” get_type_dimension
  • 4 β€” get_type_flag
  • 5 β€” get_stack_index
  • 6 β€” get_current_method
  • 7 β€” is_optional
  • 8 β€” get_default_value

πŸ‘€ See Also πŸ‘€

  • SPVM::Document::NativeAPI
  • SPVM::Document::NativeAPI::Method
  • SPVM::Document::NativeClass
  • SPVM::Document

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