Commit 336d229f027628d237a5b4c332121de7fc7d3a5b

Jens Claudius 2006-10-03T08:53:37

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.

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 );