| 460 | } |
| 461 | |
| 462 | static PyObject* AddConstraint(PyObject *self, PyObject *args) { |
| 463 | if (__z3_parser == nullptr) { |
| 464 | PyErr_SetString(PyExc_RuntimeError, "parser not initialized"); |
| 465 | return NULL; |
| 466 | } |
| 467 | |
| 468 | dfsan_label label = 0; |
| 469 | uint64_t val = 0; |
| 470 | |
| 471 | if (!PyArg_ParseTuple(args, "IL", &label, &val)) { |
| 472 | return NULL; |
| 473 | } |
| 474 | |
| 475 | if (__z3_parser->add_constraints(label, val) != 0) { |
| 476 | PyErr_SetString(PyExc_RuntimeError, "failed to add constraint"); |
| 477 | return NULL; |
| 478 | } |
| 479 | |
| 480 | Py_RETURN_NONE; |
| 481 | } |
| 482 | |
| 483 | static PyObject* RecordMemcmp(PyObject *self, PyObject *args) { |
| 484 | if (__z3_parser == nullptr) { |
nothing calls this directly
no test coverage detected