[この節は執筆中]
以下のような Perl コードを考えてみましょう。
{
package Mine ;
sub new { bless [@_] }
sub Display { print $_[0][1], "\n" }
}
$a = new Mine ('red', 'green', 'blue') ;
call_Display($a, 'Display') ;
メソッド `Display' は、単にリストの最初の要素を出力するものです。そ
して、 `call_Display' の XSUB インプリメンテーションです。
void
call_Display(ref, method)
SV * ref
char * method
CODE:
PUSHMARK(sp);
XPUSHs(ref);
PUTBACK;
perl_call_method(method, G_DISCARD) ;
Go to the first, previous, next, last section, table of contents.