/* Header for coding system handler.
Copyright (C) 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009
+ 2005, 2006, 2007, 2008, 2009, 2010
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
#define decode_coding_string(coding, string, nocopy) \
decode_coding_object (coding, string, 0, 0, SCHARS (string), \
- STRING_BYTES (XSTRING (string)), Qt)
+ SBYTES (string), Qt)
#define encode_coding_string(coding, string, nocopy) \
- (encode_coding_object (coding, string, 0, 0, SCHARS (string), \
- STRING_BYTES (XSTRING (string)), Qt), \
- (coding)->dst_object)
+ (STRING_MULTIBYTE(string) ? \
+ (encode_coding_object (coding, string, 0, 0, SCHARS (string), \
+ SBYTES (string), Qt), \
+ (coding)->dst_object) : (string))
#define decode_coding_c_string(coding, src, bytes, dst_object) \