From e4f7d2058f032e9697fe3c236d27e0954cf97951 Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Thu, 9 Jan 2025 11:13:33 -0800 Subject: [PATCH] Release 4.3.12 (#260) Signed-off-by: David P. Chassin --- module/optimize/cvx.cpp | 11 ++++++++++- source/version.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/module/optimize/cvx.cpp b/module/optimize/cvx.cpp index 919548493..556d5ada3 100644 --- a/module/optimize/cvx.cpp +++ b/module/optimize/cvx.cpp @@ -21,6 +21,7 @@ cvx *cvx::defaults = NULL; // convenience objects PyObject *gld = NULL; +PyObject *mod_list = NULL; PyObject *class_dict = NULL; PyObject *global_list = NULL; PyObject *object_dict = NULL; @@ -188,9 +189,11 @@ cvx::cvx(MODULE *module) // create gld global gld = PyModule_New("gld"); + mod_list = PyList_New(0); class_dict = PyDict_New(); global_list = PyList_New(0); object_dict = PyDict_New(); + PyModule_AddObject(gld,"modules",mod_list); PyModule_AddObject(gld,"classes",class_dict); PyModule_AddObject(gld,"globals",global_list); PyModule_AddObject(gld,"objects",object_dict); @@ -315,8 +318,14 @@ int cvx::init(OBJECT *parent) PyList_Append(global_list,PyUnicode_FromString(var->prop->name)); } + // construct module list + for ( MODULE *module = gl_module_getfirst() ; module != NULL ; module = module->next ) + { + PyList_Append(mod_list,PyUnicode_FromString(module->name)); + } + // construct class data dictionary - for ( CLASS *oclass = callback->class_getfirst() ; oclass != NULL ; oclass = oclass->next ) + for ( CLASS *oclass = gl_class_get_first() ; oclass != NULL ; oclass = oclass->next ) { PyObject *defs = PyList_New(0); for ( PROPERTY *prop = oclass->pmap ; prop != NULL && prop->oclass == oclass ; prop = prop->next ) diff --git a/source/version.h b/source/version.h index 9230f01f2..f7614e913 100644 --- a/source/version.h +++ b/source/version.h @@ -11,7 +11,7 @@ #define REV_MAJOR 4 #define REV_MINOR 3 -#define REV_PATCH 11 +#define REV_PATCH 12 #ifdef HAVE_CONFIG_H #include "config.h"