Files
test/source/blender/python/generic/imbuf_py_api.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

21 lines
378 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup pygen
*/
#include <Python.h>
struct ImBuf;
[[nodiscard]] PyObject *BPyInit_imbuf();
extern PyTypeObject Py_ImBuf_Type;
/** Return the #ImBuf or null with an error set. */
[[nodiscard]] ImBuf *BPy_ImBuf_FromPyObject(PyObject *py_imbuf);