Blender  V2.93
bpy_intern_string.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
25 #include <Python.h>
26 
27 #include "bpy_intern_string.h"
28 
29 #include "BLI_utildefines.h"
30 
31 static PyObject *bpy_intern_str_arr[16];
32 
49 
51 {
52  uint i = 0;
53 
54 #define BPY_INTERN_STR(var, str) \
55  { \
56  var = bpy_intern_str_arr[i++] = PyUnicode_FromString(str); \
57  } \
58  (void)0
59 
69  BPY_INTERN_STR(bpy_intern_str_bl_target_properties, "bl_target_properties");
76 
77 #undef BPY_INTERN_STR
78 
80 }
81 
83 {
85  while (i--) {
86  Py_DECREF(bpy_intern_str_arr[i]);
87  }
88 }
#define BLI_assert(a)
Definition: BLI_assert.h:58
unsigned int uint
Definition: BLI_sys_types.h:83
#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_self
PyObject * bpy_intern_str___module__
void bpy_intern_string_init(void)
PyObject * bpy_intern_str_bl_target_properties
PyObject * bpy_intern_str_bl_property
PyObject * bpy_intern_str___doc__
static PyObject * bpy_intern_str_arr[16]
PyObject * bpy_intern_str_attr
#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
void bpy_intern_string_exit(void)
PyObject * bpy_intern_str_frame