From 7354f07eadcc276c0daf83954aced41a0d6a265a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 Mar 2020 10:24:44 +1100 Subject: Cleanup: use doxy sections & add missing sections --- .../blender/python/intern/bpy_app_translations.c | 32 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index cf4550089ba..190d4eb1855 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -45,6 +45,10 @@ # include "BLI_string.h" #endif +/* ------------------------------------------------------------------- */ +/** \name Local Struct to Store Translation + * \{ */ + typedef struct { PyObject_HEAD /** The string used to separate context from actual message in PY_TRANSLATE RNA props. */ @@ -63,9 +67,14 @@ typedef struct { /* Our singleton instance pointer */ static BlenderAppTranslations *_translations = NULL; +/** \} */ + #ifdef WITH_INTERNATIONAL -/***** Helpers for ghash *****/ +/* ------------------------------------------------------------------- */ +/** \name Helpers for GHash + * \{ */ + typedef struct GHashKey { const char *msgctxt; const char *msgid; @@ -111,7 +120,11 @@ static void _ghashutil_keyfree(void *ptr) # define _ghashutil_valfree MEM_freeN -/***** Python's messages cache *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Python'S Messages Cache + * \{ */ /* We cache all messages available for a given locale from all py dicts into a single ghash. * Changing of locale is not so common, while looking for a message translation is, @@ -389,7 +402,12 @@ static PyObject *app_translations_py_messages_unregister(BlenderAppTranslations Py_RETURN_NONE; } -/***** C-defined contexts *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name C-defined Contexts + * \{ */ + /* This is always available (even when WITH_INTERNATIONAL is not defined). */ static PyTypeObject BlenderAppTranslationsContextsType; @@ -439,7 +457,11 @@ static PyObject *app_translations_contexts_make(void) return translations_contexts; } -/***** Main BlenderAppTranslations Py object definition *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Main #BlenderAppTranslations #PyObject Definition + * \{ */ PyDoc_STRVAR(app_translations_contexts_doc, "A named tuple containing all pre-defined translation contexts.\n" @@ -887,3 +909,5 @@ void BPY_app_translations_end(void) _clear_translations_cache(); #endif } + +/** \} */ -- cgit v1.2.3