Re: The big UTF8 changeover...



On tir, 2002-11-05 at 12:52, Guillaume Cottenceau wrote:
Christian Borup <borup borup com> writes:

Most of the times, I've used it when we want a gtk function to be
potentially called with NULL as a gchar* argument. Then, using
"undef" (testing for PL_sv_undef in the c file) is far more
elegant/perlish than using 0, IMHO.


So we let the typemap convert NULL to and from undef... Not a big deal,
really.

Using "0" instead of "undef" from within perl is dirty, IMHO.

I agree. And I said undef. I didn't even mention 0.

 
Anyway, my point was really just that if every bit of code does this
kind of thing itself. The codebase gets hard to manage.

No, we just need a couple of helper functions for those cases.

Same difference. Both keeps the code in one place.
Now that I figured out how typemaps work I tend to favor those. Because
they save me from having to do things by hand.

Also one typemap can handle mapping to and from many types, its not
nesesary to generate a typemap for every type.

./borup




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]