call PyErr_SetString with a vprint interface and translation support */
| 483 | |
| 484 | /* call PyErr_SetString with a vprint interface and translation support */ |
| 485 | void |
| 486 | PLy_exception_set(PyObject *exc, const char *fmt,...) |
| 487 | { |
| 488 | char buf[1024]; |
| 489 | va_list ap; |
| 490 | |
| 491 | va_start(ap, fmt); |
| 492 | vsnprintf(buf, sizeof(buf), dgettext(TEXTDOMAIN, fmt), ap); |
| 493 | va_end(ap); |
| 494 | |
| 495 | PyErr_SetString(exc, buf); |
| 496 | } |
| 497 | |
| 498 | /* same, with pluralized message */ |
| 499 | void |
no outgoing calls
no test coverage detected