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:
@@ -336,6 +336,11 @@ static PyObject *pygpu_batch_program_use_end(BPyGPUBatch *self)
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
|
||||
static PyMethodDef pygpu_batch__tp_methods[] = {
|
||||
{"vertbuf_add", (PyCFunction)pygpu_batch_vertbuf_add, METH_O, pygpu_batch_vertbuf_add_doc},
|
||||
{"program_set", (PyCFunction)pygpu_batch_program_set, METH_O, pygpu_batch_program_set_doc},
|
||||
@@ -353,6 +358,10 @@ static PyMethodDef pygpu_batch__tp_methods[] = {
|
||||
{nullptr, nullptr, 0, nullptr},
|
||||
};
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef USE_GPU_PY_REFERENCES
|
||||
|
||||
static int pygpu_batch__tp_traverse(BPyGPUBatch *self, visitproc visit, void *arg)
|
||||
|
||||
Reference in New Issue
Block a user