ObjFW  Check-in [59dd873fd0]

Overview
Comment:-[hexadecimalValueAsInteger] returns an unsigned value now.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 59dd873fd0211bcb3f13029314a89fb7fb08de682c3a447f48fc3c54f33f90c4
User & Date: js on 2010-04-02 16:33:07
Other Links: manifest | tags
Context
2010-04-03
01:34
Add -[writeLine:] to OFStream. check-in: da71912af5 user: js tags: trunk
2010-04-02
16:33
-[hexadecimalValueAsInteger] returns an unsigned value now. check-in: 59dd873fd0 user: js tags: trunk
15:58
Use open() / read() / write() instead of fopen() / fread() / fwrite(). check-in: 5f4f207266 user: js tags: trunk
Changes

Modified src/OFString.h from [728aa93b28] to [2ed8d736d0].

294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

/**
 * Returns the hexadecimal value of the string as an intmax_t or throws an
 * OFInvalidEncoding exception if the string contains any non-number characters.
 *
 * \return An OFNumber
 */
- (intmax_t)hexadecimalValueAsInteger;
@end

#import "OFConstString.h"
#import "OFMutableString.h"
#import "OFHashes.h"
#import "OFURLEncoding.h"
#import "OFXMLElement.h"







|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

/**
 * Returns the hexadecimal value of the string as an intmax_t or throws an
 * OFInvalidEncoding exception if the string contains any non-number characters.
 *
 * \return An OFNumber
 */
- (uintmax_t)hexadecimalValueAsInteger;
@end

#import "OFConstString.h"
#import "OFMutableString.h"
#import "OFHashes.h"
#import "OFURLEncoding.h"
#import "OFXMLElement.h"

Modified src/OFString.m from [7e77eaece2] to [a9d9dd698d].

827
828
829
830
831
832
833
834
835
836
837
838
839
840
841

	if (string[0] == '-')
		num *= -1;

	return num;
}

- (intmax_t)hexadecimalValueAsInteger
{
	int i = 0;
	uintmax_t num = 0;

	if (length == 0)
		return 0;








|







827
828
829
830
831
832
833
834
835
836
837
838
839
840
841

	if (string[0] == '-')
		num *= -1;

	return num;
}

- (uintmax_t)hexadecimalValueAsInteger
{
	int i = 0;
	uintmax_t num = 0;

	if (length == 0)
		return 0;