return NULL;
    self->ob_fval = val;
    Py_RETURN_NONE
}
This is equivalent to the Python method:
```python
def replace(self, val):
    self.ob_fval = val

It is instructive to read more about how defining methods works in CPython. In general, methods take as the first parameter the instance of the object, and optionally parameters for the positional arguments and keyword arguments. This static function is registered as a method on our float:
static PyMethodDef float_methods[] = {
    {"replace", (PyCFunction)replace, METH_VARARGS,
    "replace the value in the float"
    },
    {NULL} /* Sentinel */
}

This registers a method called replace, which is implemented by the C function of the same name. The METH_VARARGS flag indicates that the method takes a tuple of arguments representing all the arguments to the function. This array is set to the tp_methods field of the type object, and then we can use the replace method on objects of that type.