about summary refs log tree commit diff
path: root/wcsmbs/wctob.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wctob.c')
-rw-r--r--wcsmbs/wctob.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c
index cd44bc6b32..d053b9a28f 100644
--- a/wcsmbs/wctob.c
+++ b/wcsmbs/wctob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -35,6 +35,7 @@ wctob (c)
   wchar_t *inptr = inbuf;
   size_t dummy;
   int status;
+  const struct gconv_fcts *fcts;
 
   if (c == WEOF)
     return EOF;
@@ -51,14 +52,14 @@ wctob (c)
   /* Make sure we start in the initial state.  */
   memset (&data.__state, '\0', sizeof (mbstate_t));
 
-  /* Make sure we use the correct function.  */
-  update_conversion_ptrs ();
+  /* Get the conversion functions.  */
+  fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
 
   /* Create the input string.  */
   inbuf[0] = c;
 
-  status = DL_CALL_FCT (__wcsmbs_gconv_fcts.tomb->__fct,
-			(__wcsmbs_gconv_fcts.tomb, &data,
+  status = DL_CALL_FCT (fcts->tomb->__fct,
+			(fcts->tomb, &data,
 			 (const unsigned char **) &inptr,
 			 (const unsigned char *) &inbuf[1],
 			 NULL, &dummy, 0, 1));