+/* Create a new gdb.RecordGap object. */
+
+PyObject *
+recpy_gap_new (int reason_code, const char *reason_string, Py_ssize_t number)
+{
+ recpy_gap_object * const obj = PyObject_New (recpy_gap_object,
+ &recpy_gap_type);
+
+ if (obj == NULL)
+ return NULL;
+
+ obj->reason_code = reason_code;
+ obj->reason_string = reason_string;
+ obj->number = number;
+
+ return (PyObject *) obj;
+}
+
+/* Implementation of RecordGap.number [int]. */
+
+static PyObject *
+recpy_gap_number (PyObject *self, void *closure)
+{
+ const recpy_gap_object * const obj = (const recpy_gap_object *) self;
+
+ return PyInt_FromSsize_t (obj->number);
+}
+
+/* Implementation of RecordGap.error_code [int]. */
+
+static PyObject *
+recpy_gap_reason_code (PyObject *self, void *closure)
+{
+ const recpy_gap_object * const obj = (const recpy_gap_object *) self;
+
+ return PyInt_FromLong (obj->reason_code);
+}
+
+/* Implementation of RecordGap.error_string [str]. */
+
+static PyObject *
+recpy_gap_reason_string (PyObject *self, void *closure)
+{
+ const recpy_gap_object * const obj = (const recpy_gap_object *) self;
+
+ return PyString_FromString (obj->reason_string);
+}
+