Blender  V3.3
Macros | Functions | Variables
bpy_intern_string.c File Reference
#include <Python.h>
#include "bpy_intern_string.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

#define BPY_INTERN_STR(var, str)
 

Functions

void bpy_intern_string_init (void)
 
void bpy_intern_string_exit (void)
 

Variables

static PyObject * bpy_intern_str_arr [17]
 
PyObject * bpy_intern_str___annotations__
 
PyObject * bpy_intern_str___doc__
 
PyObject * bpy_intern_str___main__
 
PyObject * bpy_intern_str___module__
 
PyObject * bpy_intern_str___name__
 
PyObject * bpy_intern_str___slots__
 
PyObject * bpy_intern_str_attr
 
PyObject * bpy_intern_str_bl_property
 
PyObject * bpy_intern_str_bl_rna
 
PyObject * bpy_intern_str_bl_target_properties
 
PyObject * bpy_intern_str_bpy_types
 
PyObject * bpy_intern_str_frame
 
PyObject * bpy_intern_str_properties
 
PyObject * bpy_intern_str_register
 
PyObject * bpy_intern_str_self
 
PyObject * bpy_intern_str_depsgraph
 
PyObject * bpy_intern_str_unregister
 

Detailed Description

Store python versions of strings frequently used for python lookups to avoid converting, creating the hash and freeing every time as PyDict_GetItemString and PyObject_GetAttrString do.

Definition in file bpy_intern_string.c.

Macro Definition Documentation

◆ BPY_INTERN_STR

#define BPY_INTERN_STR (   var,
  str 
)
Value:
{ \
var = bpy_intern_str_arr[i++] = PyUnicode_FromString(str); \
} \
(void)0
static PyObject * bpy_intern_str_arr[17]
SyclQueue void void size_t num_bytes void
#define str(s)

Function Documentation

◆ bpy_intern_string_exit()

void bpy_intern_string_exit ( void  )

Definition at line 70 of file bpy_intern_string.c.

References ARRAY_SIZE, and bpy_intern_str_arr.

Referenced by BPY_python_end().

◆ bpy_intern_string_init()

void bpy_intern_string_init ( void  )

Variable Documentation

◆ bpy_intern_str___annotations__

PyObject* bpy_intern_str___annotations__

Definition at line 19 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and pyrna_deferred_register_props().

◆ bpy_intern_str___doc__

PyObject* bpy_intern_str___doc__

Definition at line 20 of file bpy_intern_string.c.

Referenced by bpy_class_validate_recursive(), and bpy_intern_string_init().

◆ bpy_intern_str___main__

PyObject* bpy_intern_str___main__

Definition at line 21 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and python_script_exec().

◆ bpy_intern_str___module__

PyObject* bpy_intern_str___module__

Definition at line 22 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and pyrna_srna_Subtype().

◆ bpy_intern_str___name__

PyObject* bpy_intern_str___name__

Definition at line 23 of file bpy_intern_string.c.

Referenced by bpy_class_validate_recursive(), and bpy_intern_string_init().

◆ bpy_intern_str___slots__

PyObject* bpy_intern_str___slots__

◆ bpy_intern_str_arr

PyObject* bpy_intern_str_arr[17]
static

Definition at line 17 of file bpy_intern_string.c.

Referenced by bpy_intern_string_exit(), and bpy_intern_string_init().

◆ bpy_intern_str_attr

PyObject* bpy_intern_str_attr

Definition at line 25 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and deferred_register_prop().

◆ bpy_intern_str_bl_property

PyObject* bpy_intern_str_bl_property

Definition at line 26 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and operator_properties_init().

◆ bpy_intern_str_bl_rna

PyObject* bpy_intern_str_bl_rna

◆ bpy_intern_str_bl_target_properties

PyObject* bpy_intern_str_bl_target_properties

Definition at line 28 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and gizmo_properties_init().

◆ bpy_intern_str_bpy_types

PyObject* bpy_intern_str_bpy_types

Definition at line 29 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and pyrna_srna_Subtype().

◆ bpy_intern_str_depsgraph

PyObject* bpy_intern_str_depsgraph

◆ bpy_intern_str_frame

PyObject* bpy_intern_str_frame

◆ bpy_intern_str_properties

PyObject* bpy_intern_str_properties

Definition at line 31 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and pyrna_py_to_prop().

◆ bpy_intern_str_register

PyObject* bpy_intern_str_register

Definition at line 32 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and pyrna_register_class().

◆ bpy_intern_str_self

PyObject* bpy_intern_str_self

◆ bpy_intern_str_unregister

PyObject* bpy_intern_str_unregister

Definition at line 35 of file bpy_intern_string.c.

Referenced by bpy_intern_string_init(), and pyrna_unregister_class().