Files
test2/source/blender/python/intern/bpy_rna_callback.hh
Campbell Barton 6253a33aa3 Cleanup: use nodiscard attribute for functions in the Python API
In most (cases functions returning a PyObject pointer
requires it to be used by the caller, declare functions in the Python
API with the `nodiscard` attribute.
2025-06-28 10:15:27 +10:00

22 lines
556 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup pythonintern
*/
#include <Python.h>
struct BPy_StructRNA;
#if 0
[[nodiscard]] PyObject *pyrna_callback_add(BPy_StructRNA *self, PyObject *args);
[[nodiscard]] PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args);
#endif
[[nodiscard]] PyObject *pyrna_callback_classmethod_add(PyObject *self, PyObject *args);
[[nodiscard]] PyObject *pyrna_callback_classmethod_remove(PyObject *self, PyObject *args);