# HG changeset patch # User Ken Raeburn # Date 937321977 0 # Node ID 3c6ad00e51a8a37621b0cd78f242309fc6b2183c # Parent e2d5cd96727ba57fd385c4a34c1b89009474b284 Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member access. diff -r e2d5cd96727b -r 3c6ad00e51a8 src/print.c --- a/src/print.c Tue Sep 14 13:09:49 1999 +0000 +++ b/src/print.c Tue Sep 14 15:12:57 1999 +0000 @@ -855,11 +855,11 @@ /* If OBJ is (error STRING), just return STRING. That is not only faster, it also avoids the need to allocate space here when the error is due to memory full. */ - if (CONSP (obj) && EQ (XCONS (obj)->car, Qerror) - && CONSP (XCONS (obj)->cdr) - && STRINGP (XCONS (XCONS (obj)->cdr)->car) - && NILP (XCONS (XCONS (obj)->cdr)->cdr)) - return XCONS (XCONS (obj)->cdr)->car; + if (CONSP (obj) && EQ (XCAR (obj), Qerror) + && CONSP (XCDR (obj)) + && STRINGP (XCAR (XCDR (obj))) + && NILP (XCDR (XCDR (obj)))) + return XCAR (XCDR (obj)); print_error_message (obj, Vprin1_to_string_buffer); @@ -909,7 +909,7 @@ /* For file-error, make error message by concatenating all the data items. They are all strings. */ if (!NILP (file_error) && CONSP (tail)) - errmsg = XCONS (tail)->car, tail = XCONS (tail)->cdr; + errmsg = XCAR (tail), tail = XCDR (tail); if (STRINGP (errmsg)) Fprinc (errmsg, stream); @@ -1266,7 +1266,7 @@ { char pigbuf[350]; /* see comments in float_to_string */ - float_to_string (pigbuf, XFLOAT(obj)->data); + float_to_string (pigbuf, XFLOAT_DATA (obj)); strout (pigbuf, -1, -1, printcharfun, 0); } break; @@ -1814,10 +1814,10 @@ printcharfun, escapeflag); } strout ("[alist-elt] ", -1, -1, printcharfun, 0); - print_object (XCONS (XBUFFER_LOCAL_VALUE (obj)->cdr)->car, + print_object (XCAR (XBUFFER_LOCAL_VALUE (obj)->cdr), printcharfun, escapeflag); strout ("[default-value] ", -1, -1, printcharfun, 0); - print_object (XCONS (XBUFFER_LOCAL_VALUE (obj)->cdr)->cdr, + print_object (XCDR (XBUFFER_LOCAL_VALUE (obj)->cdr), printcharfun, escapeflag); PRINTCHAR ('>'); break;