diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-11-23 05:21:31 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-11-23 05:21:31 +0000 |
commit | 5e92b1caaf9b63bd4f8913901514da76a8fa415f (patch) | |
tree | b2953347ad602cd19f8a7a5cc26c78cf3e796fc9 /src/coding.h | |
parent | 8fe48a6f120586a8df05b299f3079d267b7c5f9f (diff) | |
download | emacs-5e92b1caaf9b63bd4f8913901514da76a8fa415f.tar.gz |
(ENCODE_FILE, DECODE_FILE, ENCODE_SYSTEM, DECODE_SYSTEM):
Don't use XFASTINT blindly.
Diffstat (limited to 'src/coding.h')
-rw-r--r-- | src/coding.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/coding.h b/src/coding.h index bc8af2cc4a2..a0732305ada 100644 --- a/src/coding.h +++ b/src/coding.h @@ -1,4 +1,5 @@ /* Header for coding system handler. + Copyright (C) 2004 Free Software Foundation, Inc. Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. @@ -572,10 +573,10 @@ struct coding_system for file names, if any. */ #define ENCODE_FILE(name) \ (! NILP (Vfile_name_coding_system) \ - && XFASTINT (Vfile_name_coding_system) != 0 \ + && !EQ (Vfile_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ : (! NILP (Vdefault_file_name_coding_system) \ - && XFASTINT (Vdefault_file_name_coding_system) != 0 \ + && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ : name)) @@ -583,10 +584,10 @@ struct coding_system for file names, if any. */ #define DECODE_FILE(name) \ (! NILP (Vfile_name_coding_system) \ - && XFASTINT (Vfile_name_coding_system) != 0 \ + && !EQ (Vfile_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ : (! NILP (Vdefault_file_name_coding_system) \ - && XFASTINT (Vdefault_file_name_coding_system) != 0 \ + && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ : name)) @@ -595,7 +596,7 @@ struct coding_system for w32 system functions, if any. */ #define ENCODE_SYSTEM(str) \ (! NILP (Vlocale_coding_system) \ - && XFASTINT (Vlocale_coding_system) != 0 \ + && !EQ (Vlocale_coding_system, make_number (0)) \ ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ : str) @@ -603,7 +604,7 @@ struct coding_system for w32 system functions, if any. */ #define DECODE_SYSTEM(name) \ (! NILP (Vlocale_coding_system) \ - && XFASTINT (Vlocale_coding_system) != 0 \ + && !EQ (Vlocale_coding_system, make_number (0)) \ ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ : str) |