Explain in wxPlatformInfo docs that it means bitness when it says architecture

In the context of wxPlatformInfo, 'architecture' means either '32 bit' or
'64 bit'. Anywhere outside the context of wxPlatformInfo, this concept is
known as 'bitness'.

For the rest of the world, 'architecture' generally refers to the CPU
instruction set architecture, i.e. something like x86, x86_64, arm64, whereas
'operating system architecture' refers to the design of separating kernel
space, user space, etc.
This commit is contained in:
Lauri Nurmi
2020-11-19 00:20:48 +02:00
parent dd864cffe0
commit 68ea3c59f1
5 changed files with 13 additions and 14 deletions

View File

@@ -82,7 +82,7 @@ enum wxPortId
wxPORT_QT = 1 << 10 // wxQT, using Qt 5+ wxPORT_QT = 1 << 10 // wxQT, using Qt 5+
}; };
// architecture of the operating system // architecture bitness of the operating system
// (regardless of the build environment of wxWidgets library - see // (regardless of the build environment of wxWidgets library - see
// wxIsPlatform64bit documentation for more info) // wxIsPlatform64bit documentation for more info)
enum wxArchitecture enum wxArchitecture
@@ -134,7 +134,7 @@ struct wxLinuxDistributionInfo
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Information about the toolkit that the app is running under and some basic // Information about the toolkit that the app is running under and some basic
// platform and architecture info // platform and architecture bitness info
class WXDLLIMPEXP_BASE wxPlatformInfo class WXDLLIMPEXP_BASE wxPlatformInfo
{ {
public: public:
@@ -359,7 +359,7 @@ protected:
// others // others
// ----------------- // -----------------
// architecture of the OS/machine // architecture bitness of the OS/machine
wxArchitecture m_arch; wxArchitecture m_arch;
// endianness of the machine // endianness of the machine

View File

@@ -150,7 +150,7 @@ WXDLLIMPEXP_BASE bool wxCheckOsVersion(int majorVsn, int minorVsn = 0, int micro
// Get platform endianness // Get platform endianness
WXDLLIMPEXP_BASE bool wxIsPlatformLittleEndian(); WXDLLIMPEXP_BASE bool wxIsPlatformLittleEndian();
// Get platform architecture // Get platform architecture bitness
WXDLLIMPEXP_BASE bool wxIsPlatform64Bit(); WXDLLIMPEXP_BASE bool wxIsPlatform64Bit();
// Get machine CPU architecture // Get machine CPU architecture

View File

@@ -74,7 +74,7 @@ enum wxPortId
/** /**
The architecture of the operating system The architecture bitness of the operating system
(regardless of the build environment of wxWidgets library - see ::wxIsPlatform64Bit() (regardless of the build environment of wxWidgets library - see ::wxIsPlatform64Bit()
documentation for more info). documentation for more info).
*/ */
@@ -126,7 +126,7 @@ struct wxLinuxDistributionInfo
@class wxPlatformInfo @class wxPlatformInfo
This class holds information about the operating system, the toolkit and the This class holds information about the operating system, the toolkit and the
basic architecture of the machine where the application is currently running. basic architecture bitness of the machine where the application is currently running.
This class does not only have @e getters for the information above, it also has This class does not only have @e getters for the information above, it also has
@e setters. This allows you to e.g. save the current platform information in a @e setters. This allows you to e.g. save the current platform information in a
@@ -227,7 +227,7 @@ public:
/** /**
Converts the given string to a wxArchitecture enum value or to Converts the given string to a wxArchitecture enum value or to
@c wxARCH_INVALID if the given string is not a valid architecture string @c wxARCH_INVALID if the given string is not a valid architecture bitness string
(i.e. does not contain nor @c 32 nor @c 64 strings). (i.e. does not contain nor @c 32 nor @c 64 strings).
*/ */
static wxArchitecture GetArch(const wxString& arch); static wxArchitecture GetArch(const wxString& arch);
@@ -322,7 +322,7 @@ public:
//@{ //@{
/** /**
Returns the architecture ID of this wxPlatformInfo instance. Returns the architecture bitness ID of this wxPlatformInfo instance.
*/ */
wxArchitecture GetArchitecture() const; wxArchitecture GetArchitecture() const;
@@ -440,7 +440,7 @@ public:
//@{ //@{
/** /**
Returns the name for the architecture of this wxPlatformInfo instance. Returns the name for the architecture bitness of this wxPlatformInfo instance.
*/ */
wxString GetArchName() const; wxString GetArchName() const;
@@ -483,7 +483,7 @@ public:
//@{ //@{
/** /**
Sets the architecture enum value associated with this wxPlatformInfo instance. Sets the architecture bitness enum value associated with this wxPlatformInfo instance.
*/ */
void SetArchitecture(wxArchitecture n); void SetArchitecture(wxArchitecture n);

View File

@@ -970,12 +970,11 @@ bool wxCheckOsVersion(int majorVsn, int minorVsn = 0, int microVsn = 0);
bit. The check is performed at run-time and may differ from the value bit. The check is performed at run-time and may differ from the value
available at compile-time (at compile-time you can just check if available at compile-time (at compile-time you can just check if
<tt>sizeof(void*) == 8</tt>) since the program could be running in <tt>sizeof(void*) == 8</tt>) since the program could be running in
emulation mode or in a mixed 32/64 bit system (bi-architecture operating emulation mode or in a mixed 32/64 bit system.
system).
@note This function is not 100% reliable on some systems given the fact @note This function is not 100% reliable on some systems given the fact
that there isn't always a standard way to do a reliable check on the that there isn't always a standard way to do a reliable check on the
OS architecture. OS bitness.
@header{wx/utils.h} @header{wx/utils.h}
*/ */

View File

@@ -280,7 +280,7 @@ void InteractiveOutputTestCase::TestPlatformInfo()
wxPrintf(wxT("Operating system name is: %s\n"), plat.GetOperatingSystemIdName()); wxPrintf(wxT("Operating system name is: %s\n"), plat.GetOperatingSystemIdName());
wxPrintf(wxT("Port ID name is: %s\n"), plat.GetPortIdName()); wxPrintf(wxT("Port ID name is: %s\n"), plat.GetPortIdName());
wxPrintf(wxT("Port ID short name is: %s\n"), plat.GetPortIdShortName()); wxPrintf(wxT("Port ID short name is: %s\n"), plat.GetPortIdShortName());
wxPrintf(wxT("Architecture is: %s\n"), plat.GetArchName()); wxPrintf(wxT("Architecture bitness is: %s\n"), plat.GetArchName());
wxPrintf(wxT("Endianness is: %s\n"), plat.GetEndiannessName()); wxPrintf(wxT("Endianness is: %s\n"), plat.GetEndiannessName());
wxPuts(wxEmptyString); wxPuts(wxEmptyString);