<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Parrot - Native Call Interface</title> <link rel="stylesheet" type="text/css" href="../../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../../html/index.html">Home</a> » <a href="../../../html/pmc.html">PMCs</a> » Native Call Interface </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/nci.pmc - Native Call Interface</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>The vtable functions for the native C call functions.</p> <h2><a name="Methods" >Methods</a></h2> <dl> <dt><a name="static_nci_thunk_t_build_func(PARROT_INTERP,_PMC_*obj,_Parrot_NCI_attributes_*nci)" ><b><code>static nci_thunk_t build_func(PARROT_INTERP, PMC *obj, Parrot_NCI_attributes *nci)</b></code></a></dt> Actually build the NCI thunk. <dt><a name="METHOD_get_multisig()" ><b><code>METHOD get_multisig()</b></code></a></dt> Return the MMD signature PMC, if any or <code>PMCNULL</code>. <dt><a name="void_init()" ><b><code>void init()</b></code></a></dt> Initializes the NCI with a <code>NULL</code> function pointer. <dt><a name="void_set_pmc_keyed(PMC_*key,_PMC_*p)" ><b><code>void set_pmc_keyed(PMC *key, PMC *p)</b></code></a></dt> <dt><a name="void_set_pmc_keyed_str(STRING_*key,_PMC_*p)" ><b><code>void set_pmc_keyed_str(STRING *key, PMC *p)</b></code></a></dt> Call the equivalent <code>set_pointer*</code> function. <dt><a name="void_set_pointer_keyed(PMC_*key,_void_*func)" ><b><code>void set_pointer_keyed(PMC *key, void *func)</b></code></a></dt> Sets the specified function pointer and signature (<code>*key</code>). <dt><a name="void_set_pointer_keyed_str(STRING_*key,_void_*func)" ><b><code>void set_pointer_keyed_str(STRING *key, void *func)</b></code></a></dt> Sets the specified function pointer and siganture as described in the string <code>key</code>. <dt><a name="void_mark()" ><b><code>void mark()</b></code></a></dt> Mark any referenced strings and PMCs. <dt><a name="PMC_*clone()" ><b><code>PMC *clone()</b></code></a></dt> Creates and returns a clone of the NCI. <dt><a name="INTVAL_defined()" ><b><code>INTVAL defined()</b></code></a></dt> Returns whether the NCI is defined. <dt><a name="opcode_t_*invoke(void_*next)" ><b><code>opcode_t *invoke(void *next)</b></code></a></dt> Calls the associated C function, returning <code>*next</code>. If the invocant is a class, the PMC arguments are shifted down. <dt><a name="INTVAL_get_integer()" ><b><code>INTVAL get_integer()</b></code></a></dt> Returns the function pointer as an integer. <dt><a name="INTVAL_get_bool()" ><b><code>INTVAL get_bool()</b></code></a></dt> Returns the boolean value of the pointer. <dt><a name="METHOD_arity()" ><b><code>METHOD arity()</b></code></a></dt> Return the arity of the NCI (the number of arguments).</dl> <h1><a name="SEE_ALSO" >SEE ALSO</a></h1> <p><em>docs/pdds/pdd03_calling_conventions.pod</em>.</p> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>