Add a string to wx.PlatformInfo for the wxWidgets version. Also add wx.wxWidgets_version.

This commit is contained in:
Robin Dunn
2017-04-07 21:08:34 -07:00
parent f10e966484
commit 428718a3d8

View File

@@ -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);
}