On Wed, 17 Dec 2008 16:11:20 Bob Friesenhahn wrote: > I am not sure which of the solution you say is a dirty workaround and > depends on global variables.
As far as I understood the C code snippet, "cmsJumpBuffer" is a global variable of type "jmp_buf". > If you are using an object oriented > language and lcms supports passing a pointer then you can pass the > address of 'this' object and the callback function can then invoke a > well known method name on the object so that the error is handled by > the correct object. This avoids any use of a global variable. But it would still require registering a callback target (or object that has got a target)? If so, then competing calls in a multi threaded application could potentially result in a misdirected error callback invocation. > The > most common situation is to use the error info to decide if processing > should be aborted, and then the object re-checks when lcms returns to > see if an error was recorded and the user should be notified. With this respect I've seen that lcms 2.0 seems to have canned the error code parameter from the error handler. So from my current (only brief) perspective it seems like it's getting more difficult. Bit it's all still early, and many things may still change ... Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Room 2.63, Quad Block A Building Massey University, Auckland, Albany Private Bag 102 904, North Shore Mail Centre voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 eMail: g.kl...@massey.ac.nz http://iims.massey.ac.nz ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user