[devel] Make the 'png_jmpbuf' macro expand to a call that records the correct

longjmp function as well as returning a pointer to the setjmp
    jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'.
    (John Bowler)
This commit is contained in:
Glenn Randers-Pehrson
2009-11-20 21:38:24 -06:00
parent eddc5af8f5
commit f4ea22480a
7 changed files with 70 additions and 20 deletions

View File

@@ -503,7 +503,10 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef USE_FAR_KEYWORD
if (setjmp(jmpbuf))
#else
if (setjmp(png_ptr->jmpbuf))
if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */
#endif
#ifdef USE_FAR_KEYWORD
png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf));
#endif
PNG_ABORT();
#endif