[vte] iso2022: Always intern the codeset name
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] iso2022: Always intern the codeset name
- Date: Thu, 3 Apr 2014 17:06:35 +0000 (UTC)
commit c9b4abe638bf783459c52d9aeceb5b7960ab7cbb
Author: Christian Persch <chpe gnome org>
Date: Mon Mar 31 22:01:44 2014 +0200
iso2022: Always intern the codeset name
src/iso2022.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/iso2022.c b/src/iso2022.c
index b593e0e..57b5159 100644
--- a/src/iso2022.c
+++ b/src/iso2022.c
@@ -769,13 +769,13 @@ _vte_iso2022_state_new(const char *native_codeset,
state->g[1] = 'B';
state->g[2] = 'B';
state->g[3] = 'B';
- state->codeset = native_codeset;
- state->native_codeset = state->codeset;
+ state->native_codeset = state->codeset = g_intern_string(native_codeset);
if (native_codeset == NULL) {
- g_get_charset(&state->codeset);
- state->native_codeset = state->codeset;
- }
- state->utf8_codeset = "UTF-8";
+ const char *codeset;
+ g_get_charset(&codeset);
+ state->native_codeset = state->codeset = g_intern_string(codeset);
+ }
+ state->utf8_codeset = g_intern_string("UTF-8");
state->target_codeset = VTE_CONV_GUNICHAR_TYPE;
_vte_debug_print(VTE_DEBUG_SUBSTITUTION,
"Native codeset \"%s\", currently %s\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]