From: Simon Wright <simon@pushface.org>
Subject: Re: setjmp/longjmp?
Date: 28 Sep 2003 18:12:52 +0100
Date: 2003-09-28T18:12:52+01:00 [thread overview]
Message-ID: <x7vu16wrg4r.fsf@smaug.pushface.org> (raw)
In-Reply-To: b6Ddb.1863$QH3.333@newsfep4-winn.server.ntli.net
chris <spamoff.danx@ntlworld.com> writes:
> I started a binding to libpng so I can load some images into OpenGL,
> but the library uses setjmp and longjmp for error handling. This is
> very new to me but from what I understand it's some form of library
> "goto" which allows code to jump to predefined points on given
> events. When dealing with such things is it best to wrap around the
> code with C and catch all these longjmps with setjmps, returning
> error flags if something fails?
setjmp/longjmp are like a block to catch an exception, and raising
that exception.
I would do as you suggest - your chance of setting up a jmpbuf in Ada
is close to zero.
next prev parent reply other threads:[~2003-09-28 17:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-28 15:33 setjmp/longjmp? chris
2003-09-28 17:12 ` Simon Wright [this message]
2003-09-28 20:54 ` setjmp/longjmp? chris
2003-09-28 18:19 ` setjmp/longjmp? Jeff C,
2003-09-28 18:49 ` setjmp/longjmp? chris
2003-09-28 19:10 ` setjmp/longjmp? Jeff C,
2003-09-28 19:14 ` setjmp/longjmp? Jeff C,
2003-09-28 21:01 ` setjmp/longjmp? chris
2003-09-29 20:17 ` setjmp/longjmp? Randy Brukardt
2003-09-29 23:04 ` setjmp/longjmp? Matthew Heaney
2003-10-16 1:49 ` setjmp/longjmp? Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox