| 1 |
|
| 2 |
#define PYTESTCAPI_NEED_INTERNAL_API |
| 3 |
|
| 4 |
#include "parts.h" |
| 5 |
#include "util.h" |
| 6 |
|
| 7 |
#include "clinic/exceptions.c.h" |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
static PyObject * |
| 22 |
_testcapi_err_set_raised(PyObject *module, PyObject *exc) |
| 23 |
|
| 24 |
{ |
| 25 |
Py_INCREF(exc); |
| 26 |
PyErr_SetRaisedException(exc); |
| 27 |
assert(PyErr_Occurred()); |
| 28 |
return NULL; |
| 29 |
} |
| 30 |
|
| 31 |
static PyObject * |
| 32 |
err_restore(PyObject *self, PyObject *args) { |
| 33 |
PyObject *type = NULL, *value = NULL, *traceback = NULL; |
| 34 |
switch(PyTuple_Size(args)) { |
| 35 |
case 3: |
| 36 |
traceback = PyTuple_GetItem(args, 2); |
| 37 |
Py_INCREF(traceback); |
| 38 |
_Py_FALLTHROUGH; |
| 39 |
case 2: |
| 40 |
value = PyTuple_GetItem(args, 1); |
| 41 |
Py_INCREF(value); |
| 42 |
_Py_FALLTHROUGH; |
| 43 |
case 1: |
| 44 |
type = PyTuple_GetItem(args, 0); |
| 45 |
Py_INCREF(type); |
| 46 |
break; |
| 47 |
default: |
| 48 |
PyErr_SetString(PyExc_TypeError, |
| 49 |
"wrong number of arguments"); |
| 50 |
return NULL; |
| 51 |
} |
| 52 |
PyErr_Restore(type, value, traceback); |
| 53 |
assert(PyErr_Occurred()); |
| 54 |
return NULL; |
| 55 |
} |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
static PyObject * |
| 67 |
_testcapi_exception_print_impl(PyObject *module, PyObject *exc, int legacy) |
| 68 |
|
| 69 |
{ |
| 70 |
if (legacy) { |
| 71 |
PyObject *tb = NULL; |
| 72 |
if (PyExceptionInstance_Check(exc)) { |
| 73 |
tb = PyException_GetTraceback(exc); |
| 74 |
} |
| 75 |
PyErr_Display((PyObject *) Py_TYPE(exc), exc, tb); |
| 76 |
Py_XDECREF(tb); |
| 77 |
} |
| 78 |
else { |
| 79 |
PyErr_DisplayException(exc); |
| 80 |
} |
| 81 |
Py_RETURN_NONE; |
| 82 |
} |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
static PyObject * |
| 95 |
_testcapi_make_exception_with_doc_impl(PyObject *module, const char *name, |
| 96 |
const char *doc, PyObject *base, |
| 97 |
PyObject *dict) |
| 98 |
|
| 99 |
{ |
| 100 |
return PyErr_NewExceptionWithDoc(name, doc, base, dict); |
| 101 |
} |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
static PyObject * |
| 111 |
_testcapi_exc_set_object_impl(PyObject *module, PyObject *exc, PyObject *obj) |
| 112 |
|
| 113 |
{ |
| 114 |
PyErr_SetObject(exc, obj); |
| 115 |
return NULL; |
| 116 |
} |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
static PyObject * |
| 123 |
_testcapi_exc_set_object_fetch_impl(PyObject *module, PyObject *exc, |
| 124 |
PyObject *obj) |
| 125 |
|
| 126 |
{ |
| 127 |
PyObject *type = UNINITIALIZED_PTR; |
| 128 |
PyObject *value = UNINITIALIZED_PTR; |
| 129 |
PyObject *tb = UNINITIALIZED_PTR; |
| 130 |
|
| 131 |
PyErr_SetObject(exc, obj); |
| 132 |
PyErr_Fetch(&type, &value, &tb); |
| 133 |
assert(type != UNINITIALIZED_PTR); |
| 134 |
assert(value != UNINITIALIZED_PTR); |
| 135 |
assert(tb != UNINITIALIZED_PTR); |
| 136 |
Py_XDECREF(type); |
| 137 |
Py_XDECREF(tb); |
| 138 |
return value; |
| 139 |
} |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
static PyObject * |
| 149 |
_testcapi_err_setstring_impl(PyObject *module, PyObject *exc, |
| 150 |
const char *value, Py_ssize_t value_length) |
| 151 |
|
| 152 |
{ |
| 153 |
NULLABLE(exc); |
| 154 |
PyErr_SetString(exc, value); |
| 155 |
return NULL; |
| 156 |
} |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
static PyObject * |
| 167 |
_testcapi_err_setfromerrnowithfilename_impl(PyObject *module, int error, |
| 168 |
PyObject *exc, const char *value, |
| 169 |
Py_ssize_t value_length) |
| 170 |
|
| 171 |
{ |
| 172 |
NULLABLE(exc); |
| 173 |
errno = error; |
| 174 |
PyErr_SetFromErrnoWithFilename(exc, value); |
| 175 |
return NULL; |
| 176 |
} |
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
static PyObject * |
| 186 |
_testcapi_raise_exception_impl(PyObject *module, PyObject *exc, int num_args) |
| 187 |
|
| 188 |
{ |
| 189 |
PyObject *exc_args = PyTuple_New(num_args); |
| 190 |
if (exc_args == NULL) { |
| 191 |
return NULL; |
| 192 |
} |
| 193 |
for (int i = 0; i < num_args; ++i) { |
| 194 |
PyObject *v = PyLong_FromLong(i); |
| 195 |
if (v == NULL) { |
| 196 |
Py_DECREF(exc_args); |
| 197 |
return NULL; |
| 198 |
} |
| 199 |
PyTuple_SET_ITEM(exc_args, i, v); |
| 200 |
} |
| 201 |
PyErr_SetObject(exc, exc_args); |
| 202 |
Py_DECREF(exc_args); |
| 203 |
return NULL; |
| 204 |
} |
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
static PyObject * |
| 211 |
_testcapi_raise_memoryerror_impl(PyObject *module) |
| 212 |
|
| 213 |
{ |
| 214 |
return PyErr_NoMemory(); |
| 215 |
} |
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
static PyObject * |
| 225 |
_testcapi_fatal_error_impl(PyObject *module, const char *message, |
| 226 |
int release_gil) |
| 227 |
|
| 228 |
{ |
| 229 |
if (release_gil) { |
| 230 |
Py_BEGIN_ALLOW_THREADS |
| 231 |
Py_FatalError(message); |
| 232 |
Py_END_ALLOW_THREADS |
| 233 |
} |
| 234 |
else { |
| 235 |
Py_FatalError(message); |
| 236 |
} |
| 237 |
|
| 238 |
Py_RETURN_NONE; |
| 239 |
} |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
static PyObject * |
| 250 |
_testcapi_set_exc_info_impl(PyObject *module, PyObject *new_type, |
| 251 |
PyObject *new_value, PyObject *new_tb) |
| 252 |
|
| 253 |
{ |
| 254 |
PyObject *type = UNINITIALIZED_PTR, *value = UNINITIALIZED_PTR, *tb = UNINITIALIZED_PTR; |
| 255 |
PyErr_GetExcInfo(&type, &value, &tb); |
| 256 |
|
| 257 |
Py_INCREF(new_type); |
| 258 |
Py_INCREF(new_value); |
| 259 |
Py_INCREF(new_tb); |
| 260 |
PyErr_SetExcInfo(new_type, new_value, new_tb); |
| 261 |
|
| 262 |
PyObject *orig_exc = PyTuple_Pack(3, |
| 263 |
type ? type : Py_None, |
| 264 |
value ? value : Py_None, |
| 265 |
tb ? tb : Py_None); |
| 266 |
Py_XDECREF(type); |
| 267 |
Py_XDECREF(value); |
| 268 |
Py_XDECREF(tb); |
| 269 |
return orig_exc; |
| 270 |
} |
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
static PyObject * |
| 279 |
_testcapi_set_exception(PyObject *module, PyObject *new_exc) |
| 280 |
|
| 281 |
{ |
| 282 |
PyObject *exc = PyErr_GetHandledException(); |
| 283 |
assert(PyExceptionInstance_Check(exc) || exc == NULL); |
| 284 |
PyErr_SetHandledException(new_exc); |
| 285 |
return exc; |
| 286 |
} |
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
static PyObject * |
| 297 |
_testcapi_traceback_print_impl(PyObject *module, PyObject *traceback, |
| 298 |
PyObject *file) |
| 299 |
|
| 300 |
{ |
| 301 |
if (PyTraceBack_Print(traceback, file) < 0) { |
| 302 |
return NULL; |
| 303 |
} |
| 304 |
Py_RETURN_NONE; |
| 305 |
} |
| 306 |
|
| 307 |
static PyObject * |
| 308 |
err_writeunraisable(PyObject *Py_UNUSED(module), PyObject *args) |
| 309 |
{ |
| 310 |
PyObject *exc, *obj; |
| 311 |
if (!PyArg_ParseTuple(args, "OO", &exc, &obj)) { |
| 312 |
return NULL; |
| 313 |
} |
| 314 |
NULLABLE(exc); |
| 315 |
NULLABLE(obj); |
| 316 |
if (exc) { |
| 317 |
PyErr_SetRaisedException(Py_NewRef(exc)); |
| 318 |
} |
| 319 |
PyErr_WriteUnraisable(obj); |
| 320 |
Py_RETURN_NONE; |
| 321 |
} |
| 322 |
|
| 323 |
static PyObject * |
| 324 |
err_formatunraisable(PyObject *Py_UNUSED(module), PyObject *args) |
| 325 |
{ |
| 326 |
PyObject *exc; |
| 327 |
const char *fmt; |
| 328 |
Py_ssize_t fmtlen; |
| 329 |
PyObject *objs[10] = {NULL}; |
| 330 |
|
| 331 |
if (!PyArg_ParseTuple(args, "Oz#|OOOOOOOOOO", &exc, &fmt, &fmtlen, |
| 332 |
&objs[0], &objs[1], &objs[2], &objs[3], &objs[4], |
| 333 |
&objs[5], &objs[6], &objs[7], &objs[8], &objs[9])) |
| 334 |
{ |
| 335 |
return NULL; |
| 336 |
} |
| 337 |
NULLABLE(exc); |
| 338 |
if (exc) { |
| 339 |
PyErr_SetRaisedException(Py_NewRef(exc)); |
| 340 |
} |
| 341 |
PyErr_FormatUnraisable(fmt, |
| 342 |
objs[0], objs[1], objs[2], objs[3], objs[4], |
| 343 |
objs[5], objs[6], objs[7], objs[8], objs[9]); |
| 344 |
Py_RETURN_NONE; |
| 345 |
} |
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
static PyObject * |
| 356 |
_testcapi_unstable_exc_prep_reraise_star_impl(PyObject *module, |
| 357 |
PyObject *orig, PyObject *excs) |
| 358 |
|
| 359 |
{ |
| 360 |
return PyUnstable_Exc_PrepReraiseStar(orig, excs); |
| 361 |
} |
| 362 |
|
| 363 |
|
| 364 |
static PyObject * |
| 365 |
unicode_encode_get_start(PyObject *Py_UNUSED(module), PyObject *arg) |
| 366 |
{ |
| 367 |
Py_ssize_t start; |
| 368 |
if (PyUnicodeEncodeError_GetStart(arg, &start) < 0) { |
| 369 |
return NULL; |
| 370 |
} |
| 371 |
RETURN_SIZE(start); |
| 372 |
} |
| 373 |
|
| 374 |
|
| 375 |
static PyObject * |
| 376 |
unicode_decode_get_start(PyObject *Py_UNUSED(module), PyObject *arg) |
| 377 |
{ |
| 378 |
Py_ssize_t start; |
| 379 |
if (PyUnicodeDecodeError_GetStart(arg, &start) < 0) { |
| 380 |
return NULL; |
| 381 |
} |
| 382 |
RETURN_SIZE(start); |
| 383 |
} |
| 384 |
|
| 385 |
|
| 386 |
static PyObject * |
| 387 |
unicode_translate_get_start(PyObject *Py_UNUSED(module), PyObject *arg) |
| 388 |
{ |
| 389 |
Py_ssize_t start; |
| 390 |
if (PyUnicodeTranslateError_GetStart(arg, &start) < 0) { |
| 391 |
return NULL; |
| 392 |
} |
| 393 |
RETURN_SIZE(start); |
| 394 |
} |
| 395 |
|
| 396 |
|
| 397 |
static PyObject * |
| 398 |
unicode_encode_set_start(PyObject *Py_UNUSED(module), PyObject *args) |
| 399 |
{ |
| 400 |
PyObject *exc; |
| 401 |
Py_ssize_t start; |
| 402 |
if (PyArg_ParseTuple(args, "On", &exc, &start) < 0) { |
| 403 |
return NULL; |
| 404 |
} |
| 405 |
if (PyUnicodeEncodeError_SetStart(exc, start) < 0) { |
| 406 |
return NULL; |
| 407 |
} |
| 408 |
Py_RETURN_NONE; |
| 409 |
} |
| 410 |
|
| 411 |
|
| 412 |
static PyObject * |
| 413 |
unicode_decode_set_start(PyObject *Py_UNUSED(module), PyObject *args) |
| 414 |
{ |
| 415 |
PyObject *exc; |
| 416 |
Py_ssize_t start; |
| 417 |
if (PyArg_ParseTuple(args, "On", &exc, &start) < 0) { |
| 418 |
return NULL; |
| 419 |
} |
| 420 |
if (PyUnicodeDecodeError_SetStart(exc, start) < 0) { |
| 421 |
return NULL; |
| 422 |
} |
| 423 |
Py_RETURN_NONE; |
| 424 |
} |
| 425 |
|
| 426 |
|
| 427 |
static PyObject * |
| 428 |
unicode_translate_set_start(PyObject *Py_UNUSED(module), PyObject *args) |
| 429 |
{ |
| 430 |
PyObject *exc; |
| 431 |
Py_ssize_t start; |
| 432 |
if (PyArg_ParseTuple(args, "On", &exc, &start) < 0) { |
| 433 |
return NULL; |
| 434 |
} |
| 435 |
if (PyUnicodeTranslateError_SetStart(exc, start) < 0) { |
| 436 |
return NULL; |
| 437 |
} |
| 438 |
Py_RETURN_NONE; |
| 439 |
} |
| 440 |
|
| 441 |
|
| 442 |
static PyObject * |
| 443 |
unicode_encode_get_end(PyObject *Py_UNUSED(module), PyObject *arg) |
| 444 |
{ |
| 445 |
Py_ssize_t end; |
| 446 |
if (PyUnicodeEncodeError_GetEnd(arg, &end) < 0) { |
| 447 |
return NULL; |
| 448 |
} |
| 449 |
RETURN_SIZE(end); |
| 450 |
} |
| 451 |
|
| 452 |
|
| 453 |
static PyObject * |
| 454 |
unicode_decode_get_end(PyObject *Py_UNUSED(module), PyObject *arg) |
| 455 |
{ |
| 456 |
Py_ssize_t end; |
| 457 |
if (PyUnicodeDecodeError_GetEnd(arg, &end) < 0) { |
| 458 |
return NULL; |
| 459 |
} |
| 460 |
RETURN_SIZE(end); |
| 461 |
} |
| 462 |
|
| 463 |
|
| 464 |
static PyObject * |
| 465 |
unicode_translate_get_end(PyObject *Py_UNUSED(module), PyObject *arg) |
| 466 |
{ |
| 467 |
Py_ssize_t end; |
| 468 |
if (PyUnicodeTranslateError_GetEnd(arg, &end) < 0) { |
| 469 |
return NULL; |
| 470 |
} |
| 471 |
RETURN_SIZE(end); |
| 472 |
} |
| 473 |
|
| 474 |
|
| 475 |
static PyObject * |
| 476 |
unicode_encode_set_end(PyObject *Py_UNUSED(module), PyObject *args) |
| 477 |
{ |
| 478 |
PyObject *exc; |
| 479 |
Py_ssize_t end; |
| 480 |
if (PyArg_ParseTuple(args, "On", &exc, &end) < 0) { |
| 481 |
return NULL; |
| 482 |
} |
| 483 |
if (PyUnicodeEncodeError_SetEnd(exc, end) < 0) { |
| 484 |
return NULL; |
| 485 |
} |
| 486 |
Py_RETURN_NONE; |
| 487 |
} |
| 488 |
|
| 489 |
|
| 490 |
static PyObject * |
| 491 |
unicode_decode_set_end(PyObject *Py_UNUSED(module), PyObject *args) |
| 492 |
{ |
| 493 |
PyObject *exc; |
| 494 |
Py_ssize_t end; |
| 495 |
if (PyArg_ParseTuple(args, "On", &exc, &end) < 0) { |
| 496 |
return NULL; |
| 497 |
} |
| 498 |
if (PyUnicodeDecodeError_SetEnd(exc, end) < 0) { |
| 499 |
return NULL; |
| 500 |
} |
| 501 |
Py_RETURN_NONE; |
| 502 |
} |
| 503 |
|
| 504 |
|
| 505 |
static PyObject * |
| 506 |
unicode_translate_set_end(PyObject *Py_UNUSED(module), PyObject *args) |
| 507 |
{ |
| 508 |
PyObject *exc; |
| 509 |
Py_ssize_t end; |
| 510 |
if (PyArg_ParseTuple(args, "On", &exc, &end) < 0) { |
| 511 |
return NULL; |
| 512 |
} |
| 513 |
if (PyUnicodeTranslateError_SetEnd(exc, end) < 0) { |
| 514 |
return NULL; |
| 515 |
} |
| 516 |
Py_RETURN_NONE; |
| 517 |
} |
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
static PyTypeObject PyRecursingInfinitelyError_Type; |
| 524 |
|
| 525 |
static int |
| 526 |
recurse_infinitely_error_init(PyObject *self, PyObject *args, PyObject *kwds) |
| 527 |
{ |
| 528 |
PyObject *type = (PyObject *)&PyRecursingInfinitelyError_Type; |
| 529 |
|
| 530 |
|
| 531 |
Py_INCREF(type); |
| 532 |
PyErr_SetObject(type, NULL); |
| 533 |
return -1; |
| 534 |
} |
| 535 |
|
| 536 |
static PyTypeObject PyRecursingInfinitelyError_Type = { |
| 537 |
.tp_name = "RecursingInfinitelyError", |
| 538 |
.tp_basicsize = sizeof(PyBaseExceptionObject), |
| 539 |
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, |
| 540 |
.tp_doc = PyDoc_STR("Instantiating this exception starts infinite recursion."), |
| 541 |
.tp_init = recurse_infinitely_error_init, |
| 542 |
}; |
| 543 |
|
| 544 |
static PyMethodDef test_methods[] = { |
| 545 |
{"err_restore", err_restore, METH_VARARGS}, |
| 546 |
{"err_writeunraisable", err_writeunraisable, METH_VARARGS}, |
| 547 |
{"err_formatunraisable", err_formatunraisable, METH_VARARGS}, |
| 548 |
_TESTCAPI_ERR_SET_RAISED_METHODDEF |
| 549 |
_TESTCAPI_EXCEPTION_PRINT_METHODDEF |
| 550 |
_TESTCAPI_FATAL_ERROR_METHODDEF |
| 551 |
_TESTCAPI_MAKE_EXCEPTION_WITH_DOC_METHODDEF |
| 552 |
_TESTCAPI_EXC_SET_OBJECT_METHODDEF |
| 553 |
_TESTCAPI_EXC_SET_OBJECT_FETCH_METHODDEF |
| 554 |
_TESTCAPI_ERR_SETSTRING_METHODDEF |
| 555 |
_TESTCAPI_ERR_SETFROMERRNOWITHFILENAME_METHODDEF |
| 556 |
_TESTCAPI_RAISE_EXCEPTION_METHODDEF |
| 557 |
_TESTCAPI_RAISE_MEMORYERROR_METHODDEF |
| 558 |
_TESTCAPI_SET_EXC_INFO_METHODDEF |
| 559 |
_TESTCAPI_SET_EXCEPTION_METHODDEF |
| 560 |
_TESTCAPI_TRACEBACK_PRINT_METHODDEF |
| 561 |
_TESTCAPI_UNSTABLE_EXC_PREP_RERAISE_STAR_METHODDEF |
| 562 |
{"unicode_encode_get_start", unicode_encode_get_start, METH_O}, |
| 563 |
{"unicode_decode_get_start", unicode_decode_get_start, METH_O}, |
| 564 |
{"unicode_translate_get_start", unicode_translate_get_start, METH_O}, |
| 565 |
{"unicode_encode_set_start", unicode_encode_set_start, METH_VARARGS}, |
| 566 |
{"unicode_decode_set_start", unicode_decode_set_start, METH_VARARGS}, |
| 567 |
{"unicode_translate_set_start", unicode_translate_set_start, METH_VARARGS}, |
| 568 |
{"unicode_encode_get_end", unicode_encode_get_end, METH_O}, |
| 569 |
{"unicode_decode_get_end", unicode_decode_get_end, METH_O}, |
| 570 |
{"unicode_translate_get_end", unicode_translate_get_end, METH_O}, |
| 571 |
{"unicode_encode_set_end", unicode_encode_set_end, METH_VARARGS}, |
| 572 |
{"unicode_decode_set_end", unicode_decode_set_end, METH_VARARGS}, |
| 573 |
{"unicode_translate_set_end", unicode_translate_set_end, METH_VARARGS}, |
| 574 |
{NULL}, |
| 575 |
}; |
| 576 |
|
| 577 |
int |
| 578 |
_PyTestCapi_Init_Exceptions(PyObject *mod) |
| 579 |
{ |
| 580 |
PyRecursingInfinitelyError_Type.tp_base = (PyTypeObject *)PyExc_Exception; |
| 581 |
if (PyType_Ready(&PyRecursingInfinitelyError_Type) < 0) { |
| 582 |
return -1; |
| 583 |
} |
| 584 |
if (PyModule_AddObjectRef(mod, "RecursingInfinitelyError", |
| 585 |
(PyObject *)&PyRecursingInfinitelyError_Type) < 0) |
| 586 |
{ |
| 587 |
return -1; |
| 588 |
} |
| 589 |
|
| 590 |
if (PyModule_AddFunctions(mod, test_methods) < 0) { |
| 591 |
return -1; |
| 592 |
} |
| 593 |
|
| 594 |
return 0; |
| 595 |
} |