"Steven N. Hirsch" <[EMAIL PROTECTED]> writes:

> On 23 Jan 2002, Jason E. Stewart wrote:
> 
> > * Xerces.C is >60k lines of C code. I don't want to ever write that by
> >   hand. As a grad student I wrote an XS interface to the Pad++ zooming
> >   graphics library (~200k lines of C++). I learned a lot about the
> >   internals of Perl's C API, but I'd never want to do it again. I'll
> >   have to see how things change with Perl 6. I know that both Dan and
> >   Simon are aware that Perl has to become more easy to interface
> >   with.
> 
> Between the rock and the hard place.  There's no doubt in my mind
> that the Xerces.C code size could be drastically reduced by
> hand-coding.  But, there's also no doubt that it would be a massive
> amount of work...

> Much of the code volume deals with exception handling.  

On a happy note ...

In SWIG 1.3.11 the code that defines exception handling has become
much more sophisticated, and it will be a simple matter for me to cut
down on the code size. First and foremost, I should just define simple
functions that do the setting of $@ in C, instead of repeating the
code in every catch block.

> Yours is the very first Perl XS extension I've seen which plays with
> $@ and die to propagate errors back to the Perl caller (an education
> in itself - thanks!)  Had you ever considered an alternate means of
> error handling?

I must acknowledge a tutorial from Matt Seargent that first showed how
to do that, I just liked it and used it.

> Probably I'm just frustrated from my repeated efforts to track down
> misbehavior under AIX.  Something is going very wrong with exception
> handling in C++, and I'm unable to convince any of the available
> debuggers to properly trace execution.  So, pay no attention to my
> ravings.. <g>.

I wish I could help more, but without access to an AIX box, I'm afraid
I can't do much. If you could get me some kind of account, I might be
able to help. I don't know if IBM is interested in donating some
hardware to Apache or SourceForge, but if they did, I'm sure that it
would help.

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to