diff options
| author | Richard M. Stallman | 1995-05-05 02:23:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-05-05 02:23:56 +0000 |
| commit | b818092206eeb9db5ab786a0d4166f9ff25bba16 (patch) | |
| tree | b29f975d26e242059bd4e93ab3acbe96a1dcea01 /src | |
| parent | d978068262f183364fabdb197880d86d53c1f974 (diff) | |
| download | emacs-b818092206eeb9db5ab786a0d4166f9ff25bba16.tar.gz emacs-b818092206eeb9db5ab786a0d4166f9ff25bba16.zip | |
(print): Make the printing understand EMACS_INTs
that are longs as well as ints.
Diffstat (limited to 'src')
| -rw-r--r-- | src/print.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index 12da3b3b6d1..3609684c640 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -755,7 +755,12 @@ print (obj, printcharfun, escapeflag) | |||
| 755 | switch (XGCTYPE (obj)) | 755 | switch (XGCTYPE (obj)) |
| 756 | { | 756 | { |
| 757 | case Lisp_Int: | 757 | case Lisp_Int: |
| 758 | sprintf (buf, "%d", XINT (obj)); | 758 | if (sizeof (int) == sizeof (EMACS_INT)) |
| 759 | sprintf (buf, "%d", XINT (obj)); | ||
| 760 | else if (sizeof (long) == sizeof (EMACS_INT)) | ||
| 761 | sprintf (buf, "%ld", XINT (obj)); | ||
| 762 | else | ||
| 763 | abort (); | ||
| 759 | strout (buf, -1, printcharfun); | 764 | strout (buf, -1, printcharfun); |
| 760 | break; | 765 | break; |
| 761 | 766 | ||