Cleanup: ignore GCC cast-function-type warning for PyMethodDef's
PyMethodDef::ml_flags define the function signature making the warning meaningless.
This commit is contained in:
@@ -311,6 +311,11 @@ static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, Py
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
|
||||
static PyMethodDef pygpu_vertbuf__tp_methods[] = {
|
||||
{"attr_fill",
|
||||
(PyCFunction)pygpu_vertbuf_attr_fill,
|
||||
@@ -319,6 +324,10 @@ static PyMethodDef pygpu_vertbuf__tp_methods[] = {
|
||||
{nullptr, nullptr, 0, nullptr},
|
||||
};
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static void pygpu_vertbuf__tp_dealloc(BPyGPUVertBuf *self)
|
||||
{
|
||||
GPU_vertbuf_discard(self->buf);
|
||||
|
||||
Reference in New Issue
Block a user