| 711 | } |
| 712 | |
| 713 | static PyObject * |
| 714 | record_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) |
| 715 | { |
| 716 | record_module_state *state; |
| 717 | |
| 718 | state = get_module_state_from_type(type); |
| 719 | if (state == NULL) { |
| 720 | return NULL; |
| 721 | } |
| 722 | |
| 723 | if (type == state->ApgRecord_Type) { |
| 724 | PyErr_Format(PyExc_TypeError, "cannot create '%.100s' instances", type->tp_name); |
| 725 | return NULL; |
| 726 | } |
| 727 | |
| 728 | /* For subclasses, use the default allocation */ |
| 729 | return type->tp_alloc(type, 0); |
| 730 | } |
| 731 | |
| 732 | static PyMethodDef record_methods[] = { |
| 733 | {"values", _PyCFunction_CAST(record_values), METH_METHOD | METH_FASTCALL | METH_KEYWORDS}, |
nothing calls this directly
no test coverage detected