Blender V2.61 - r43446
Defines | Functions

py_capi_utils.h File Reference

Go to the source code of this file.

Defines

#define PYC_INTERPRETER_ACTIVE   (((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) != NULL)

Functions

void PyC_ObSpit (const char *name, PyObject *var)
void PyC_LineSpit (void)
PyObject * PyC_ExceptionBuffer (void)
PyObject * PyC_Object_GetAttrStringArgs (PyObject *o, Py_ssize_t n,...)
PyObject * PyC_Err_Format_Prefix (PyObject *exception_type_prefix, const char *format,...)
void PyC_FileAndNum (const char **filename, int *lineno)
void PyC_FileAndNum_Safe (const char **filename, int *lineno)
int PyC_AsArray (void *array, PyObject *value, const int length, const PyTypeObject *type, const short is_double, const char *error_prefix)
PyObject * PyC_UnicodeFromByte (const char *str)
PyObject * PyC_UnicodeFromByteAndSize (const char *str, Py_ssize_t size)
const char * PyC_UnicodeAsByte (PyObject *py_str, PyObject **coerce)
PyObject * PyC_DefaultNameSpace (const char *filename)
void PyC_RunQuicky (const char *filepath, int n,...)
void PyC_MainModule_Backup (PyObject **main_mod)
void PyC_MainModule_Restore (PyObject *main_mod)
void PyC_SetHomePath (const char *py_path_bundle)

Detailed Description

Definition in file py_capi_utils.h.


Define Documentation

#define PYC_INTERPRETER_ACTIVE   (((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) != NULL)

Definition at line 54 of file py_capi_utils.h.

Referenced by PyC_FileAndNum_Safe(), and PyC_LineSpit().


Function Documentation

int PyC_AsArray ( void *  array,
PyObject *  value,
const int  length,
const PyTypeObject *  type,
const short  is_double,
const char *  error_prefix 
)
PyObject* PyC_DefaultNameSpace ( const char *  filename)

Definition at line 431 of file py_capi_utils.c.

References interp().

Referenced by BPY_button_exec(), BPY_string_exec(), PyC_RunQuicky(), and python_script_exec().

PyObject* PyC_Err_Format_Prefix ( PyObject *  exception_type_prefix,
const char *  format,
  ... 
)

Definition at line 233 of file py_capi_utils.c.

References NULL.

Referenced by bpy_class_call(), and pyrna_py_to_prop().

PyObject* PyC_ExceptionBuffer ( void  )

Definition at line 298 of file py_capi_utils.c.

References NULL.

Referenced by BPy_errors_to_report(), pointer_type_from_py(), and pyrna_py_to_prop().

void PyC_FileAndNum ( const char **  filename,
int *  lineno 
)

Definition at line 153 of file py_capi_utils.c.

References mod(), and NULL.

Referenced by BPy_errors_to_report(), PyC_FileAndNum_Safe(), and PyC_LineSpit().

void PyC_FileAndNum_Safe ( const char **  filename,
int *  lineno 
)

Definition at line 192 of file py_capi_utils.c.

References PyC_FileAndNum(), and PYC_INTERPRETER_ACTIVE.

void PyC_LineSpit ( void  )

Definition at line 135 of file py_capi_utils.c.

References PyC_FileAndNum(), and PYC_INTERPRETER_ACTIVE.

Referenced by _RNA_warning().

void PyC_MainModule_Backup ( PyObject **  main_mod)

Definition at line 446 of file py_capi_utils.c.

References interp().

Referenced by BPY_button_exec(), BPY_string_exec(), and python_script_exec().

void PyC_MainModule_Restore ( PyObject *  main_mod)

Definition at line 453 of file py_capi_utils.c.

References interp().

Referenced by BPY_string_exec(), and python_script_exec().

PyObject* PyC_Object_GetAttrStringArgs ( PyObject *  o,
Py_ssize_t  n,
  ... 
)

Definition at line 202 of file py_capi_utils.c.

References i.

void PyC_ObSpit ( const char *  name,
PyObject *  var 
)

Definition at line 115 of file py_capi_utils.c.

References NULL.

Referenced by bpy_class_free(), PyC_RunQuicky(), pyrna_srna_ExternalType(), and pyrna_subtype_set_rna().

void PyC_RunQuicky ( const char *  filepath,
int  n,
  ... 
)

Definition at line 503 of file py_capi_utils.c.

References i, NULL, PyC_DefaultNameSpace(), and PyC_ObSpit().

void PyC_SetHomePath ( const char *  py_path_bundle)

Definition at line 461 of file py_capi_utils.c.

References BLI_setenv(), BLI_strncpy_wchar_from_utf8(), and NULL.

Referenced by BPY_python_start().

const char* PyC_UnicodeAsByte ( PyObject *  py_str,
PyObject **  coerce 
)

Definition at line 371 of file py_capi_utils.c.

References NULL.

Referenced by BPy_IDProperty_Map_ValidateAndCreate(), and pyrna_py_to_prop().

PyObject* PyC_UnicodeFromByte ( const char *  str)
PyObject* PyC_UnicodeFromByteAndSize ( const char *  str,
Py_ssize_t  size 
)