I just discovered (with 5.005_03) that if I say:

    typedef struct foobar * Foo__Bar;

in my .xs file, and put only:

    Foo::Bar    T_PTROBJ

in my typemap, it does the Right Thing, and I can use Foo::Bar in my XS
type declarations. Previously, I used $ntype (as the example in perlxs
explains), and then switched to $Package, as NI-S suggested in a recent
post.

I'd like to use the implicit s/__/::/g behaviour instead, but it appears
to be undocumented, so:

    1. Does it work with older versions of Perl (or xsubpp, I suppose)?
    2. Will it ever go away?
    3. Does it have any disadvantages?

(If it's merely under-documented, I'll submit a documentation patch to
p5p.)

- ams

Reply via email to