2006-10-03 Jens Claudius <jens.claudius@yahoo.com> * include/freetype/config/ftstdlib.h: Cast away volatileness from argument to ft_setjmp. * include/freetype/internal/ftvalid.h: Add comment that ft_validator_run must not be used.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/ChangeLog b/ChangeLog
index 1403614..c59a5c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-03 Jens Claudius <jens.claudius@yahoo.com>
+
+ * include/freetype/config/ftstdlib.h: Cast away volatileness from
+ argument to ft_setjmp.
+
+ * include/freetype/internal/ftvalid.h: Add comment that
+ ft_validator_run must not be used.
+
2006-10-01 Werner Lemberg <wl@gnu.org>
* src/base/ftbase.c: Undo change from 2006-09-30.
diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h
index aaba8b3..970a50f 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -168,12 +168,12 @@
#include <setjmp.h>
-#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
- /* jmp_buf is defined as a macro */
- /* on certain platforms */
+#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
+ /* jmp_buf is defined as a macro */
+ /* on certain platforms */
-#define ft_longjmp longjmp /* likewise */
-#define ft_setjmp setjmp /* same thing here */
+#define ft_longjmp longjmp
+#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */
/* the following is only used for debugging purposes, i.e., if */
diff --git a/include/freetype/internal/ftvalid.h b/include/freetype/internal/ftvalid.h
index 12bbc2b..00cd85e 100644
--- a/include/freetype/internal/ftvalid.h
+++ b/include/freetype/internal/ftvalid.h
@@ -98,6 +98,8 @@ FT_BEGIN_HEADER
const FT_Byte* limit,
FT_ValidationLevel level );
+ /* Do not use this. It's broken and will cause your validator to crash */
+ /* if you run it on an invalid font. */
FT_BASE( FT_Int )
ft_validator_run( FT_Validator valid );