CVS update by aidan xemacs/src ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Tue Aug 21 16:32:42 EDT 2007
User: aidan
Date: 07/08/21 22:32:42
Modified: xemacs/src ChangeLog mule-ccl.c lisp.h
Log:
Don't use args to XINT_OR_CHAR where multiple evaluation is possible; revise
X_I_O_C to not multiply evaluate.
Revision Changes Path
1.1089 +9 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1088
retrieving revision 1.1089
diff -u -p -r1.1088 -r1.1089
--- ChangeLog 2007/08/17 10:16:46 1.1088
+++ ChangeLog 2007/08/21 20:32:33 1.1089
@@ -1,3 +1,12 @@
+2007-08-21 Aidan Kehoe <kehoea at parhasard.net>
+
+ * mule-ccl.c (ccl_driver):
+ Don't pass XCHAR_OR_INT an argument of which the evaluation has
+ side effects; thank you Mike Fabian.
+ * lisp.h:
+ Redundantly, don't multiply evaluate the argument to XCHAR_OR_INT;
+ this should prevent the same error in the future.
+
2007-08-17 Marcus Crestani <crestani at xemacs.org>
* mc-alloc.c (L1_INDEX):
1.34 +3 -3 XEmacs/xemacs/src/mule-ccl.c
Index: mule-ccl.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-ccl.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- mule-ccl.c 2007/07/26 11:15:08 1.33
+++ mule-ccl.c 2007/08/21 20:32:37 1.34
@@ -1578,7 +1578,7 @@ ccl_driver (struct ccl_program *ccl,
Lisp_Object map, content, attrib, value;
int point, size, fin_ic;
- j = XCHAR_OR_INT (ccl_prog[ic++]); /* number of maps. */
+ j = XCHAR_OR_INT (ccl_prog[ic]); ic++; /* number of maps. */
fin_ic = ic + j;
op = reg[rrr];
if ((j > reg[RRR]) && (j >= 0))
@@ -1693,7 +1693,7 @@ ccl_driver (struct ccl_program *ccl,
stack_idx_of_map_multiple = 0;
map_set_rest_length =
- XCHAR_OR_INT (ccl_prog[ic++]); /* number of maps and separators. */
+ XCHAR_OR_INT (ccl_prog[ic]); ic++; /* number of maps and separators. */
fin_ic = ic + map_set_rest_length;
op = reg[rrr];
@@ -1880,7 +1880,7 @@ ccl_driver (struct ccl_program *ccl,
{
Lisp_Object map, attrib, value, content;
int size, point;
- j = XCHAR_OR_INT (ccl_prog[ic++]); /* map_id */
+ j = XCHAR_OR_INT (ccl_prog[ic]); ic++;/* map_id */
op = reg[rrr];
if (j >= XVECTOR (Vcode_conversion_map_vector)->size)
{
1.148 +9 -1 XEmacs/xemacs/src/lisp.h
Index: lisp.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lisp.h,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -p -r1.147 -r1.148
--- lisp.h 2007/08/17 08:04:27 1.147
+++ lisp.h 2007/08/21 20:32:37 1.148
@@ -2890,7 +2890,15 @@ XCHAR_OR_INT_1 (Lisp_Object obj, const A
#else /* no error checking */
-#define XCHAR_OR_INT(obj) (CHARP (obj) ? XCHAR (obj) : XINT (obj))
+/* obj is multiply eval'ed and not an lvalue; use an inline function instead
+ of a macro. */
+DECLARE_INLINE_HEADER (
+EMACS_INT
+XCHAR_OR_INT (Lisp_Object obj)
+)
+{
+ return CHARP (obj) ? XCHAR (obj) : XINT (obj);
+}
#endif /* no error checking */
More information about the XEmacs-CVS
mailing list