ExtUtils::Typemaps::STL::String(3pm)

ExtUtils::Typemaps::STL::String3pm

A set of typemaps for stl std::strings

Usage

  use ExtUtils::Typemaps::STL::String;
  # First, read my own type maps:
  my $private_map = ExtUtils::Typemaps->new(file => 'my.map');
  
  # Then, get the object map set and merge it into my maps
  $private_map->merge(typemap => ExtUtils::Typemaps::STL::String->new);
  
  # Now, write the combined map to an output file
  $private_map->write(file => 'typemap');

Overview

"ExtUtils::Typemaps::STL::String" is an "ExtUtils::Typemaps" subclass that provides a set of mappings for C++ STL strings. These are:

  TYPEMAP
  std::string   T_STD_STRING
  std::string*  T_STD_STRING_PTR
  INPUT
  T_STD_STRING
      $var = std::string( SvPV_nolen( $arg ), SvCUR( $arg ) );
  T_STD_STRING_PTR
      $var = new std::string( SvPV_nolen( $arg ), SvCUR( $arg ) );
  OUTPUT
  T_STD_STRING
      $arg = newSVpvn( $var.c_str(), $var.length() );
  T_STD_STRING_PTR
      $arg = newSVpvn( $var->c_str(), $var->length() );

Methods

These are the overridden methods:

new

Creates a new "ExtUtils::Typemaps::STL::String" object. It acts as any other "ExtUtils::Typemaps" object, except that it has the string type maps initialized.

Releases

6 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8
  2. 9–10
  3. 11
  4. 12–13

Author

Steffen Mueller <[email protected]>

From libextutils-typemaps-default-perl 1.05-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.