GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  EXTUTILS::PARSEXS::UTILITIES (3)

.ds Aq ’

NAME

ExtUtils::ParseXS::Utilities - Subroutines used with ExtUtils::ParseXS

CONTENTS

SYNOPSIS



  use ExtUtils::ParseXS::Utilities qw(
    standard_typemap_locations
    trim_whitespace
    C_string
    valid_proto_string
    process_typemaps
    map_type
    standard_XS_defs
    assign_func_args
    analyze_preprocessor_statements
    set_cond
    Warn
    blurt
    death
    check_conditional_preprocessor_statements
    escape_file_for_line_directive
    report_typemap_failure
  );



SUBROUTINES

The following functions are not considered to be part of the public interface. They are documented here for the benefit of future maintainers of this module.

CWstandard_typemap_locations()

o Purpose

Provide a list of filepaths where typemap files may be found. The filepaths — relative paths to files (not just directory paths) — appear in this list in lowest-to-highest priority.

The highest priority is to look in the current directory.



  typemap



The second and third highest priorities are to look in the parent of the current directory and a directory called lib/ExtUtils underneath the parent directory.



  ../typemap,
  ../lib/ExtUtils/typemap,



The fourth through ninth highest priorities are to look in the corresponding grandparent, great-grandparent and great-great-grandparent directories.



  ../../typemap,
  ../../lib/ExtUtils/typemap,
  ../../../typemap,
  ../../../lib/ExtUtils/typemap,
  ../../../../typemap,
  ../../../../lib/ExtUtils/typemap,



The tenth and subsequent priorities are to look in directories named ExtUtils which are subdirectories of directories found in @INCprovided a file named typemap actually exists in such a directory. Example:



  /usr/local/lib/perl5/5.10.1/ExtUtils/typemap,



However, these filepaths appear in the list returned by standard_typemap_locations() in reverse order, i.e., lowest-to-highest.



  /usr/local/lib/perl5/5.10.1/ExtUtils/typemap,
  ../../../../lib/ExtUtils/typemap,
  ../../../../typemap,
  ../../../lib/ExtUtils/typemap,
  ../../../typemap,
  ../../lib/ExtUtils/typemap,
  ../../typemap,
  ../lib/ExtUtils/typemap,
  ../typemap,
  typemap



o Arguments



  my @stl = standard_typemap_locations( \@INC );



Reference to @INC.

o Return Value

Array holding list of directories to be searched for typemap files.

CWtrim_whitespace()

o Purpose

Perform an in-place trimming of leading and trailing whitespace from the first argument provided to the function.

o Argument



  trim_whitespace($arg);



o Return Value

None. Remember: this is an in-place modification of the argument.

CWC_string()

o Purpose

Escape backslashes (\) in prototype strings.

o Arguments



      $ProtoThisXSUB = C_string($_);



String needing escaping.

o Return Value

Properly escaped string.

CWvalid_proto_string()

o Purpose

Validate prototype string.

o Arguments

String needing checking.

o Return Value

Upon success, returns the same string passed as argument.

Upon failure, returns 0.

CWprocess_typemaps()

o Purpose

Process all typemap files.

o Arguments



  my $typemaps_object = process_typemaps( $args{typemap}, $pwd );



List of two elements: typemap element from %args; current working directory.

o Return Value

Upon success, returns an ExtUtils::Typemaps object.

CWmap_type()

o Purpose

Performs a mapping at several places inside PARAGRAPH loop.

o Arguments



  $type = map_type($self, $type, $varname);



List of three arguments.

o Return Value

String holding augmented version of second argument.

CWstandard_XS_defs()

o Purpose

Writes to the .c output file certain preprocessor directives and function headers needed in all such files.

o Arguments

None.

o Return Value

Returns true.

CWassign_func_args()

o Purpose

Perform assignment to the func_args attribute.

o Arguments



  $string = assign_func_args($self, $argsref, $class);



List of three elements. Second is an array reference; third is a string.

o Return Value

String.

CWanalyze_preprocessor_statements()

o Purpose

Within each function inside each Xsub, print to the .c output file certain preprocessor statements.

o Arguments



      ( $self, $XSS_work_idx, $BootCode_ref ) =
        analyze_preprocessor_statements(
          $self, $statement, $XSS_work_idx, $BootCode_ref
        );



List of four elements.

o Return Value

Modifed values of three of the arguments passed to the function. In particular, the XSStack and InitFileCode attributes are modified.

CWset_cond()

o Purpose
o Arguments
o Return Value

CWcurrent_line_number()

o Purpose

Figures out the current line number in the XS file.

o Arguments

$self

o Return Value

The current line number.

CWWarn()

o Purpose
o Arguments
o Return Value

CWblurt()

o Purpose
o Arguments
o Return Value

CWdeath()

o Purpose
o Arguments
o Return Value

CWcheck_conditional_preprocessor_statements()

o Purpose
o Arguments
o Return Value

CWescape_file_for_line_directive()

o Purpose

Escapes a given code source name (typically a file name but can also be a command that was read from) so that double-quotes and backslashes are escaped.

o Arguments

A string.

o Return Value

A string with escapes for double-quotes and backslashes.

CWreport_typemap_failure

o Purpose

Do error reporting for missing typemaps.

o Arguments

The ExtUtils::ParseXS object.

An ExtUtils::Typemaps object.

The string that represents the C type that was not found in the typemap.

Optionally, the string death or blurt to choose whether the error is immediately fatal or not. Default: blurt

o Return Value

Returns nothing. Depending on the arguments, this may call death or blurt, the former of which is fatal.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 EXTUTILS::PARSEXS::UTILITIES (3) 2014-03-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.