61 |
61 |
return ret;
|
62 |
62 |
}
|
63 |
63 |
#define PyStringFree(string) ;
|
|
64 |
void PyErr_WarnFormat(PyObject *category, int stacklevel, const char *format, ...) {
|
|
65 |
|
|
66 |
va_list ap;
|
|
67 |
char s[1024];
|
|
68 |
|
|
69 |
va_start(ap, format);
|
|
70 |
g_vsnprintf(s, 1024, format, ap);
|
|
71 |
va_end(ap);
|
|
72 |
PyErr_WarnEx(category, s, stacklevel);
|
|
73 |
}
|
64 |
74 |
#endif
|
65 |
75 |
|
66 |
76 |
GQuark lasso_wrapper_key;
|
... | ... | |
120 |
130 |
PyDict_SetItemString(dict, (char*)keys->data, item);
|
121 |
131 |
Py_DECREF(item);
|
122 |
132 |
} else {
|
123 |
|
PyErr_Warn(PyExc_RuntimeWarning, "hashtable contains a null value");
|
|
133 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "hashtable contains a null value");
|
124 |
134 |
}
|
125 |
135 |
}
|
126 |
136 |
g_list_free(begin);
|
... | ... | |
149 |
159 |
PyDict_SetItemString(dict, (char*)keys->data, item);
|
150 |
160 |
Py_DECREF(item);
|
151 |
161 |
} else {
|
152 |
|
PyErr_Warn(PyExc_RuntimeWarning, "hashtable contains a null value");
|
|
162 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "hashtable contains a null value");
|
153 |
163 |
}
|
154 |
164 |
}
|
155 |
165 |
g_list_free(begin);
|
... | ... | |
424 |
434 |
PyTuple_SetItem(a_tuple, i, str);
|
425 |
435 |
i++;
|
426 |
436 |
} else {
|
427 |
|
PyErr_Warn(PyExc_RuntimeWarning,
|
428 |
|
"list contains a NULL value");
|
|
437 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "list contains a NULL value");
|
429 |
438 |
}
|
430 |
439 |
a_list = a_list->next;
|
431 |
440 |
}
|
... | ... | |
457 |
466 |
PyTuple_SetItem(a_tuple, i, str);
|
458 |
467 |
i++;
|
459 |
468 |
} else {
|
460 |
|
PyErr_Warn(PyExc_RuntimeWarning,
|
461 |
|
"could not convert an xmlNode to a string");
|
|
469 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "could not convert an xmlNode to a string");
|
462 |
470 |
}
|
463 |
471 |
} else {
|
464 |
|
PyErr_Warn(PyExc_RuntimeWarning,
|
465 |
|
"list contains a NULL value");
|
|
472 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "list contains a NULL value");
|
466 |
473 |
}
|
467 |
474 |
a_list = a_list->next;
|
468 |
475 |
}
|
... | ... | |
495 |
502 |
PyTuple_SetItem(a_tuple, i, pygobject);
|
496 |
503 |
i++;
|
497 |
504 |
} else {
|
498 |
|
PyErr_Warn(PyExc_RuntimeWarning,
|
499 |
|
"could not convert a GObject to a PyGobject");
|
|
505 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "could not convert a GObject to a PyGobject");
|
500 |
506 |
}
|
501 |
507 |
} else {
|
502 |
|
PyErr_Warn(PyExc_RuntimeWarning,
|
503 |
|
"list contains a NULL value");
|
|
508 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "list contains a NULL value");
|
504 |
509 |
}
|
505 |
510 |
a_list = a_list->next;
|
506 |
511 |
}
|
507 |
|
-
|