0005-python-fix-warning-about-discarded-const-modifier-44.patch
bindings/python/wrapper_top.c | ||
---|---|---|
262 | 262 |
g_hash_table_remove_all (a_hash); |
263 | 263 |
i = 0; |
264 | 264 |
while (PyDict_Next(dict, &i, &key, &value)) { |
265 |
char *ckey = PyString_AsString(key); |
|
266 |
g_hash_table_replace (a_hash, ckey, ((PyGObjectPtr*)value)->obj); |
|
265 |
const char *ckey = PyString_AsString(key); |
|
266 |
g_hash_table_replace (a_hash, g_strdup(ckey), ((PyGObjectPtr*)value)->obj); |
|
267 |
PyStringFree(ckey); |
|
267 | 268 |
} |
268 | 269 |
return; |
269 | 270 |
failure: |
... | ... | |
305 | 306 |
g_hash_table_remove_all (a_hash); |
306 | 307 |
i = 0; |
307 | 308 |
while (PyDict_Next(dict, &i, &key, &value)) { |
308 |
char *ckey = PyString_AsString(key); |
|
309 |
char *cvalue = PyString_AsString(value); |
|
309 |
const char *ckey = PyString_AsString(key);
|
|
310 |
const char *cvalue = PyString_AsString(value);
|
|
310 | 311 |
g_hash_table_insert (a_hash, g_strdup(ckey), g_strdup(cvalue)); |
312 |
PyStringFree(ckey); |
|
313 |
PyStringFree(cvalue); |
|
311 | 314 |
} |
312 | 315 |
failure: |
313 | 316 |
return; |
... | ... | |
403 | 406 | |
404 | 407 |
static xmlNode* |
405 | 408 |
get_xml_node_from_pystring(PyObject *string) { |
406 |
char *utf8 = NULL; |
|
409 |
const char *utf8 = NULL;
|
|
407 | 410 |
Py_ssize_t size; |
408 | 411 |
xmlNode *xml_node; |
409 | 412 |
utf8 = get_pystring(string, &size); |
410 |
- |