in reply to Re^2: Terrible Trouble With Typemaps (XS Question)
in thread Terrible Trouble With Typemaps (XS Question)
CODE: if ( MY_SV_IS( ST(0), 'MyList' )) { THIS->count_Items_in( MY_CAST_SV( ST(0), 'MyList' ) } elsif (MY_SV_IS( ST(0), 'MyHash' )) { THIS->count_Items_in( MY_CAST_SV( ST(0), 'MyHash' ) }
This way, you don't have a plethora of macros. Remember, a preprocessor macro is just a direct text substitution. So, you can put text in there, kinda like what I was doing in my first reply.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Terrible Trouble With Typemaps (XS Question)
by Molt (Chaplain) on Sep 09, 2004 at 11:03 UTC |