From: handa Date: Mon, 29 Mar 2004 03:51:02 +0000 (+0000) Subject: (mlocale_set): Fix the order of M17N_OBJECT_REF and M17N_OBJECT_UNREF. X-Git-Tag: REL-1-0-2~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ff910875265d5ee27673e8814f1ff88752a59463;p=m17n%2Fm17n-lib.git (mlocale_set): Fix the order of M17N_OBJECT_REF and M17N_OBJECT_UNREF. --- diff --git a/src/locale.c b/src/locale.c index a20a23c..29fb049 100644 --- a/src/locale.c +++ b/src/locale.c @@ -387,26 +387,26 @@ mlocale_set (int category, const char *name) return NULL; if (name && (category == LC_ALL || category == LC_COLLATE)) { - M17N_OBJECT_UNREF (mlocale__collate); M17N_OBJECT_REF (locale); + M17N_OBJECT_UNREF (mlocale__collate); mlocale__collate = locale; } else if (name && (category == LC_ALL || category == LC_CTYPE)) { - M17N_OBJECT_UNREF (mlocale__ctype); M17N_OBJECT_REF (locale); + M17N_OBJECT_UNREF (mlocale__ctype); mlocale__ctype = locale; } if (name && (category == LC_ALL || category == LC_MESSAGES)) { - M17N_OBJECT_UNREF (mlocale__messages); M17N_OBJECT_REF (locale); + M17N_OBJECT_UNREF (mlocale__messages); mlocale__messages = locale; } if (name && (category == LC_ALL || category == LC_TIME)) { - M17N_OBJECT_UNREF (mlocale__time); M17N_OBJECT_REF (locale); + M17N_OBJECT_UNREF (mlocale__time); mlocale__time = locale; } return locale;