ObjFW  Check-in [3d215a4f7d]

Overview
Comment:OFSystemInfo: Move const into correct place
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3d215a4f7db671d6e172aba5cf97eec3070e5fe28e8244b9b0b2fec368b60cb7
User & Date: js on 2023-04-22 10:14:46
Other Links: manifest | tags
Context
2023-04-22
17:27
utils/ofatalkcfg: Fix missing newline in output check-in: c401c7482d user: js tags: trunk
10:14
OFSystemInfo: Move const into correct place check-in: 3d215a4f7d user: js tags: trunk
09:55
Add +[OFSystemInfo networkInterfaces] check-in: c3f58bce43 user: js tags: trunk
Changes

Modified src/OFSystemInfo.h from [6d6c0b651c] to [5d11d16867].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 * @brief A key in the per-interface dictionary returned by
 *	  @ref networkInterfaces.
 *
 * Possible keys are:
 *
 *   * @ref OFNetworkInterfaceAddresses
 */
typedef OFString *OFNetworkInterfaceInfoKey;

/**
 * @brief The addresses of a network interface.
 *
 * This maps to an @ref OFData of @ref OFSocketAddress.
 */
extern const OFConstantString *OFNetworkInterfaceAddresses;
#endif

/**
 * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h
 *
 * @brief A class for querying information about the system.
 */







|






|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 * @brief A key in the per-interface dictionary returned by
 *	  @ref networkInterfaces.
 *
 * Possible keys are:
 *
 *   * @ref OFNetworkInterfaceAddresses
 */
typedef OFConstantString *OFNetworkInterfaceInfoKey;

/**
 * @brief The addresses of a network interface.
 *
 * This maps to an @ref OFData of @ref OFSocketAddress.
 */
extern OFConstantString *const OFNetworkInterfaceAddresses;
#endif

/**
 * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h
 *
 * @brief A class for querying information about the system.
 */

Modified src/OFSystemInfo.m from [3c961c10ed] to [74da2775f2].

118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#if defined(OF_X86_64) || defined(OF_X86)
struct X86Regs {
	uint32_t eax, ebx, ecx, edx;
};
#endif

#if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_GETIFADDRS)
const OFConstantString *OFNetworkInterfaceAddresses =
    @"OFNetworkInterfaceAddresses";
#endif

static size_t pageSize = 4096;
static size_t numberOfCPUs = 1;
static OFString *operatingSystemName = nil;
static OFString *operatingSystemVersion = nil;







|







118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#if defined(OF_X86_64) || defined(OF_X86)
struct X86Regs {
	uint32_t eax, ebx, ecx, edx;
};
#endif

#if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_GETIFADDRS)
OFConstantString *const OFNetworkInterfaceAddresses =
    @"OFNetworkInterfaceAddresses";
#endif

static size_t pageSize = 4096;
static size_t numberOfCPUs = 1;
static OFString *operatingSystemName = nil;
static OFString *operatingSystemVersion = nil;

Modified src/exceptions/OFGetOptionFailedException.m from [baf044fe92] to [937b3d5b17].

57
58
59
60
61
62
63
64
65
66
{
	if (_object != nil)
		return [OFString stringWithFormat:
		    @"Getting an option in an object of type %@ failed: %@",
		    [_object class], OFStrError(_errNo)];
	else
		return [OFString stringWithFormat:
		    @"Getting an failed: %@", OFStrError(_errNo)];
}
@end







|


57
58
59
60
61
62
63
64
65
66
{
	if (_object != nil)
		return [OFString stringWithFormat:
		    @"Getting an option in an object of type %@ failed: %@",
		    [_object class], OFStrError(_errNo)];
	else
		return [OFString stringWithFormat:
		    @"Getting an option failed: %@", OFStrError(_errNo)];
}
@end