From 428718a3d8d169313b266da698e9def06283a0c6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 7 Apr 2017 21:08:34 -0700 Subject: [PATCH] Add a string to wx.PlatformInfo for the wxWidgets version. Also add wx.wxWidgets_version. --- src/core_ex.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core_ex.cpp b/src/core_ex.cpp index dd35d160..8797056f 100644 --- a/src/core_ex.cpp +++ b/src/core_ex.cpp @@ -136,6 +136,8 @@ void wxPyCoreModuleInject(PyObject* moduleDict) PyDict_SetItemString(moduleDict, "Port", PyUnicode_FromString(wxPort)); PyDict_SetItemString(moduleDict, "Platform", PyUnicode_FromString(wxPort)); + PyDict_SetItemString(moduleDict, "wxWidgets_version", wx2PyString(wxVERSION_STRING)); + // Make a tuple of strings that gives more info about the platform and build. PyObject* PlatformInfo = PyList_New(0); PyObject* obj; @@ -183,9 +185,14 @@ void wxPyCoreModuleInject(PyObject* moduleDict) #endif _AddInfoString("phoenix"); + obj = wx2PyString(wxVERSION_STRING); + PyList_Append(PlatformInfo, obj); + Py_DECREF(obj); + #undef _AddInfoString PyObject* PlatformInfoTuple = PyList_AsTuple(PlatformInfo); Py_DECREF(PlatformInfo); PyDict_SetItemString(moduleDict, "PlatformInfo", PlatformInfoTuple); + }