Article View: fj.lang.perl
Article #85Re: XS と可変長引数
From: Tanaka Akira
Date: Wed, 18 Feb 1998 00:00
Date: Wed, 18 Feb 1998 00:00
28 lines
2101 bytes
2101 bytes
In article <6cbfvn$nki@melon.sso.nsc.nikko.co.jp>, tadashi@sso.nsc.nikko.co.jp (Tadashi Matsumoto(松本 匡史)) writes: > Perl5 の XS を使って、ある C ライブラリとのインターフェースとなる > モジュールを作成しています。 > そこで可変長引数が使われているのですが、perl から可変長引数を > 受け取って C の可変長引数の関数をよびだす方法がよくわかりません。 実際に使ったことはありませんが, ffcall というライブラリがあるそうです。 これを使うと可変長引数を任意に呼び出す, 任意の型を返す, クロージャをつ くる, ということが C でできるようになるようです。 ------------------------------------------------------------ ffcall is a C library for implementing foreign function calls in embedded interpreters, by Bill Triggs and Bruno Haible. It allows C functions with arbitrary argument list and return types to be called or emulated (callbacks). It supports scalar, floating-point and structure types. Included is also a library which implements closures, i.e. functions with accompanying data, as first-class C functions. ffcall supports the following CPUs: i[345]86, m68k, mips, sparc, alpha, hppa, rs6000. ffcall is available via anonymous FTP from ma2s2.mathematik.uni-karlsruhe.de [129.13.115.2], in /pub/gnu. ------------------------------------------------------------ -- [田中 哲][たなか あきら][Tanaka Akira]
Technical Details
Message-ID:
<rsqpvkmf2pr.fsf@carbon.jaist.ac.jp>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6cbfvn$nki@melon.sso.nsc.nikko.co.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 1043e7,bd18d32ce1cb4e3c X-Google-Attributes: gid1043e7,public X-Google-Thread: 106434,bd18d32ce1cb4e3c X-Google-Attributes: gid106434,public From: Tanaka Akira <akr@jaist.ac.jp> Subject: Re: XS と可変長引数 Date: 1998/02/18 Message-ID: <rsqpvkmf2pr.fsf@carbon.jaist.ac.jp> X-Deja-AN: 325960708 References: <6cbfvn$nki@melon.sso.nsc.nikko.co.jp> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-2022-JP Organization: JAIST, Hokuriku; Tatsunokuchi, Nomi, Ishikawa, Japan Newsgroups: fj.lang.perl,fj.lang.c