~ubuntu-branches/debian/experimental/inkscape/experimental

« back to all changes in this revision

Viewing changes to src/libcroco/cr-simple-sel.c

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-09-09 23:29:02 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080909232902-c50iujhk1w79u8e7
Tags: 0.46-2.1
* Non-maintainer upload.
* Add upstream patch fixing a crash in the open dialog
  in the zh_CN.utf8 locale. Closes: #487623.
  Thanks to Luca Bruno for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
CRSimpleSel *
34
34
cr_simple_sel_new (void)
35
35
{
36
 
        CRSimpleSel *result = NULL;
37
 
 
38
 
        result = g_try_malloc (sizeof (CRSimpleSel));
 
36
        CRSimpleSel *result = (CRSimpleSel *)g_try_malloc (sizeof (CRSimpleSel));
39
37
        if (!result) {
40
38
                cr_utils_trace_info ("Out of memory");
41
39
                return NULL;
103
101
        str_buf = g_string_new (NULL);
104
102
        for (cur = a_this; cur; cur = cur->next) {
105
103
                if (cur->name) {
106
 
                        guchar *str = g_strndup (cur->name->stryng->str,
 
104
                        gchar *str = g_strndup (cur->name->stryng->str,
107
105
                                                 cur->name->stryng->len);
108
106
 
109
107
                        if (str) {
131
129
                }
132
130
 
133
131
                if (cur->add_sel) {
134
 
                        guchar *tmp_str = NULL;
135
132
 
136
 
                        tmp_str = cr_additional_sel_to_string (cur->add_sel);
 
133
                        gchar *tmp_str = (gchar *)cr_additional_sel_to_string (cur->add_sel);
137
134
                        if (tmp_str) {
138
135
                                g_string_append (str_buf, tmp_str);
139
136
                                g_free (tmp_str);
143
140
        }
144
141
 
145
142
        if (str_buf) {
146
 
                result = str_buf->str;
 
143
                result = (guchar *)str_buf->str;
147
144
                g_string_free (str_buf, FALSE);
148
145
                str_buf = NULL;
149
146
        }
162
159
 
163
160
        str_buf = g_string_new (NULL);
164
161
        if (a_this->name) {
165
 
                guchar *str = g_strndup (a_this->name->stryng->str,
 
162
                gchar *str = g_strndup (a_this->name->stryng->str,
166
163
                                         a_this->name->stryng->len);
167
164
 
168
165
                if (str) {
173
170
        }
174
171
 
175
172
        if (a_this->add_sel) {
176
 
                guchar *tmp_str = NULL;
177
173
 
178
 
                tmp_str = cr_additional_sel_to_string (a_this->add_sel);
 
174
                gchar *tmp_str = (gchar *)cr_additional_sel_to_string (a_this->add_sel);
179
175
                if (tmp_str) {
180
176
                        g_string_append_printf
181
177
                                (str_buf, "%s", tmp_str);
185
181
        }
186
182
 
187
183
        if (str_buf) {
188
 
                result = str_buf->str;
 
184
                result = (guchar *)str_buf->str;
189
185
                g_string_free (str_buf, FALSE);
190
186
                str_buf = NULL;
191
187
        }