I hope this one is obvious ...
xs/modperl_xs_sv_convert.h is full if nasty (love them) macros to deal with
conversion of blessed SV* back to their pointer form and some more.
It's of course generated by Mod:Perl::WrapXS/0.01 and from xs/apache_types.map
That's all relatively straightforward,
BUT
I can figure out why this entry is in:
#define mp_xs_sv2_Apache__RequestRec(sv) \
((SvROK(sv) && (SvTYPE(SvRV(sv)) == SVt_PVMG)) \
|| (Perl_croak(aTHX_ "argument is not a blessed reference (expecting an
|Apache::RequestRec derived object)"),0) ? \
(request_rec *)SvIV((SV*)SvRV(sv)) : (request_rec *)NULL)
But apparently there are a few lucky classes that get short-hand aliases like:
#define mp_xs_sv2_r mp_xs_sv2_Apache__RequestRec
Allowing one to use:
mpxs_usage_va_1(r, "$r->puts(...)");
instead of
mpxs_usage_va_1(Apache__RequestRec, "$r->puts(...)");
or something like that.
I can't figure out how to define a new alias like that, so I don't have to do:
#define mp_xs_sv2_table mp_xs_sv2_APR__Table
to get this to work:
APR__Table table;
mpxs_usage_va_1(table,"$table->do(sub,[@filter])");
I have a feeling that I am missing ONE serious little thing there...
Help most welcome. I think it's amusing the way this _really_ feels like Perl.
Whenever something doesnt' work how I want it to, there is always another way
of doing it, maybe just a little bit less pretty.
Kudos Doug ;-)
--
Philippe M. Chiasson <[EMAIL PROTECTED]>
Extropia's Resident System Guru
http://www.eXtropia.com/
Tonight I just can't face the Muzak.
-- Larry Wall
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl
Hacker!\n$/&&print||$$++&&redo}'
PGP signature