A lot of boilerplate code was added as of the reintroduction of getsetters by 3671bfa
Much of this could be removed by a macro function for simple getter functions like:
static PyObject * Parameter_get_id(ParameterObject *self, void *closure) {
return Py_BuildValue("H", self->param->id);
}
Such a macro would need a parameter for field_name and return_type.