summary refs log tree commit diff
path: root/iconvdata/unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/unicode.c')
-rw-r--r--iconvdata/unicode.c8
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)