mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Add a string to wx.PlatformInfo for the wxWidgets version. Also add wx.wxWidgets_version.
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user