The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Name

SPVM::Document::NativeAPI::Argument - Argument Native APIs

Description

The argument native APIs of SPVM are the APIs to manipulate information of arguments.

Usage

  SPVM_API_ARG* api_arg = env->api->arg;
  
  # ...
  
  void* basic_type = api_arg->get_basic_type(env->runtime, arg);

The arg is got by the get_arg_by_index method native API.

Native APIs

get_name

  const char* (*get_name)(void* runtime, void* arg);

Returns the name of the argument.

The runtime argument is a runtime object.

The arg argument is a arg object.

get_index

  int32_t (*get_index)(void* runtime, void* arg);

Returns the index of the argument.

The runtime argument is a runtime object.

The arg argument is a arg object.

get_basic_type

  void* (*get_basic_type)(void* runtime, void* arg);

Returns the basic type of the argument.

The runtime argument is a runtime object.

The arg argument is a arg object.

get_type_dimension

  int32_t (*get_type_dimension)(void* runtime, void* arg);

Returns the type dimention of the argument.

The runtime argument is a runtime object.

The arg argument is a arg object.

get_type_flag

  int32_t (*get_type_flag)(void* runtime, void* arg);

Returns the type flag of the argument.

The runtime argument is a runtime object.

The arg argument is a arg object.

get_stack_index

  int32_t (*get_stack_index)(void* runtime, void* arg);

Gets the stack index of the argument.

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

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License