diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-12-21 18:45:50 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-12-21 18:45:50 -0500 |
commit | ee190f67cc00b958a667af75dc68f3fc21611c9f (patch) | |
tree | ba36a28e53719d191b6e0afa9a8d55757a40c123 /iconvdata/unicode.c | |
parent | 707f25dfc0a63d264e9da00368cbab5bd0f6a8c9 (diff) | |
download | glibc-ee190f67cc00b958a667af75dc68f3fc21611c9f.tar.gz glibc-ee190f67cc00b958a667af75dc68f3fc21611c9f.tar.xz glibc-ee190f67cc00b958a667af75dc68f3fc21611c9f.zip |
Store invocation-specific data of conversion modules in __gconv_step_data
Diffstat (limited to 'iconvdata/unicode.c')
-rw-r--r-- | iconvdata/unicode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/iconvdata/unicode.c b/iconvdata/unicode.c index df452d2a1d..dba4c34d64 100644 --- a/iconvdata/unicode.c +++ b/iconvdata/unicode.c @@ -1,5 +1,5 @@ /* Conversion module for Unicode - Copyright (C) 1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000-2002, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. @@ -57,7 +57,7 @@ *inptrp = inptr += 2; \ else if (get16u (inptr) == BOM_OE) \ { \ - ((struct unicode_data *) step->__data)->swap = 1; \ + data->__flags |= __GCONV_SWAP; \ *inptrp = inptr += 2; \ } \ } \ @@ -71,7 +71,7 @@ put16u (outbuf, BOM); \ outbuf += 2; \ } \ - swap = ((struct unicode_data *) step->__data)->swap; + swap = data->__flags & __GCONV_SWAP; #define EXTRA_LOOP_ARGS , swap @@ -86,7 +86,6 @@ enum direction struct unicode_data { enum direction dir; - int swap; }; @@ -110,7 +109,6 @@ gconv_init (struct __gconv_step *step) if (new_data != NULL) { new_data->dir = dir; - new_data->swap = 0; step->__data = new_data; if (dir == from_unicode) |