Blender V4.3
bpy_intern_string.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
13#include <Python.h>
14
15#include "bpy_intern_string.hh"
16
17#include "BLI_utildefines.h"
18
19static PyObject *bpy_intern_str_arr[17];
20
38
40{
41 uint i = 0;
42
43#define BPY_INTERN_STR(var, str) \
44 { \
45 var = bpy_intern_str_arr[i++] = PyUnicode_FromString(str); \
46 } \
47 (void)0
48
66
67#undef BPY_INTERN_STR
68
70}
71
73{
75 while (i--) {
76 Py_DECREF(bpy_intern_str_arr[i]);
77 }
78}
#define BLI_assert(a)
Definition BLI_assert.h:50
unsigned int uint
#define ARRAY_SIZE(arr)
PyObject * bpy_intern_str_bpy_types
PyObject * bpy_intern_str___name__
PyObject * bpy_intern_str_register
PyObject * bpy_intern_str_bl_rna
PyObject * bpy_intern_str_depsgraph
PyObject * bpy_intern_str_self
PyObject * bpy_intern_str___module__
PyObject * bpy_intern_str_bl_target_properties
void bpy_intern_string_exit()
PyObject * bpy_intern_str_bl_property
PyObject * bpy_intern_str___doc__
void bpy_intern_string_init()
PyObject * bpy_intern_str_attr
static PyObject * bpy_intern_str_arr[17]
#define BPY_INTERN_STR(var, str)
PyObject * bpy_intern_str___annotations__
PyObject * bpy_intern_str___main__
PyObject * bpy_intern_str_unregister
PyObject * bpy_intern_str___slots__
PyObject * bpy_intern_str_properties
PyObject * bpy_intern_str_frame