ObjFW  Check-in [326b0a1c33]

Overview
Comment:initWithFooString -> initAsFooString.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 326b0a1c33aee0514046168f4c24f66c2acf2512606ad3d41ad46e97e7b5a5bf
User & Date: js on 2008-10-25 22:34:17
Other Links: manifest | tags
Context
2008-10-25
23:41
Add OFXMLFactory. check-in: 8e7f91646d user: js tags: trunk
22:34
initWithFooString -> initAsFooString. check-in: 326b0a1c33 user: js tags: trunk
22:28
Decided we don't want @"" anyway. Thus remove our own alloc. check-in: 061e654036 user: js tags: trunk
Changes

Modified src/OFCString.h from [7ab81c6a80] to [61914d08b2].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

@interface OFCString: OFString
{
	char   *string;
	size_t length;
}

- initWithCString: (char*)str;
- (char*)cString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
- (OFString*)append: (OFString*)str;
- (OFString*)appendCString: (const char*)str;
@end







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

@interface OFCString: OFString
{
	char   *string;
	size_t length;
}

- initAsCString: (char*)str;
- (char*)cString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
- (OFString*)append: (OFString*)str;
- (OFString*)appendCString: (const char*)str;
@end

Modified src/OFCString.m from [cc01727386] to [c7f67be4d5].

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#import <stdlib.h>
#import <string.h>

#import "OFCString.h"
#import "OFExceptions.h"

@implementation OFCString
- initWithCString: (char*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = strlen(str);







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#import <stdlib.h>
#import <string.h>

#import "OFCString.h"
#import "OFExceptions.h"

@implementation OFCString
- initAsCString: (char*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = strlen(str);

Modified src/OFConstCString.h from [7223dd66b9] to [f47fa2a8ee].

13
14
15
16
17
18
19
20
21
22
23
24
25

@interface OFConstCString: OFString
{
	const char *string;
	size_t	   length;
}

- initWithConstCString: (const char*)str;
- (const char*)cString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
@end







|





13
14
15
16
17
18
19
20
21
22
23
24
25

@interface OFConstCString: OFString
{
	const char *string;
	size_t	   length;
}

- initAsConstCString: (const char*)str;
- (const char*)cString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
@end

Modified src/OFConstCString.m from [294711f4b4] to [cab2a5a929].

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#import "config.h"

#import <string.h>
#import "OFConstCString.h"

@implementation OFConstCString
- initWithConstCString: (const char*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = strlen(str);







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#import "config.h"

#import <string.h>
#import "OFConstCString.h"

@implementation OFConstCString
- initAsConstCString: (const char*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = strlen(str);

Modified src/OFConstWideCString.h from [bd14aa93b8] to [0e3e3b6f7d].

15
16
17
18
19
20
21
22
23
24
25
26
27

@interface OFConstWideCString: OFString
{
	const wchar_t *string;
	size_t	      length;
}

- initWithConstWideCString: (const wchar_t*)wstr;
- (const wchar_t*)wcString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
@end







|





15
16
17
18
19
20
21
22
23
24
25
26
27

@interface OFConstWideCString: OFString
{
	const wchar_t *string;
	size_t	      length;
}

- initAsConstWideCString: (const wchar_t*)wstr;
- (const wchar_t*)wcString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
@end

Modified src/OFConstWideCString.m from [68175f182a] to [ef59396699].

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#import "config.h"

#import <wchar.h>
#import "OFConstWideCString.h"

@implementation OFConstWideCString
- initWithConstWideCString: (const wchar_t*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = wcslen(str);







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#import "config.h"

#import <wchar.h>
#import "OFConstWideCString.h"

@implementation OFConstWideCString
- initAsConstWideCString: (const wchar_t*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = wcslen(str);

Modified src/OFString.m from [ffab6838ef] to [28feddcc2f].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"

@implementation OFString
+ newAsConstCString: (const char*)str
{
	return [[OFConstCString alloc] initWithConstCString: str];
}

+ newAsConstWideCString: (const wchar_t*)str
{
	return [[OFConstWideCString alloc] initWithConstWideCString: str];
}

+ newAsCString: (char*)str
{
	return [[OFCString alloc] initWithCString: str];
}

+ newAsWideCString: (wchar_t*)str
{
	return [[OFWideCString alloc] initWithWideCString: str];
}

- (char*)cString
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(cString)] raise];
	return NULL;







|




|




|




|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"

@implementation OFString
+ newAsConstCString: (const char*)str
{
	return [[OFConstCString alloc] initAsConstCString: str];
}

+ newAsConstWideCString: (const wchar_t*)str
{
	return [[OFConstWideCString alloc] initAsConstWideCString: str];
}

+ newAsCString: (char*)str
{
	return [[OFCString alloc] initAsCString: str];
}

+ newAsWideCString: (wchar_t*)str
{
	return [[OFWideCString alloc] initAsWideCString: str];
}

- (char*)cString
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(cString)] raise];
	return NULL;

Modified src/OFWideCString.h from [a0db324d5d] to [4c42e42372].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

@interface OFWideCString: OFString
{
	wchar_t	*string;
	size_t  length;
}

- initWithWideCString: (wchar_t*)str;
- (wchar_t*)wcString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
- (OFString*)append: (OFString*)str;
- (OFString*)appendWideCString: (const wchar_t*)str;
@end







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

@interface OFWideCString: OFString
{
	wchar_t	*string;
	size_t  length;
}

- initAsWideCString: (wchar_t*)str;
- (wchar_t*)wcString;
- (size_t)length;
- (OFString*)clone;
- (int)compareTo: (OFString*)str;
- (OFString*)append: (OFString*)str;
- (OFString*)appendWideCString: (const wchar_t*)str;
@end

Modified src/OFWideCString.m from [0d25058214] to [9a593a3045].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#import <string.h>
#import <wchar.h>

#import "OFWideCString.h"
#import "OFExceptions.h"

@implementation OFWideCString
- initWithWideCString: (wchar_t*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = wcslen(str);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#import <string.h>
#import <wchar.h>

#import "OFWideCString.h"
#import "OFExceptions.h"

@implementation OFWideCString
- initAsWideCString: (wchar_t*)str
{
	if ((self = [super init])) {
		if (str == NULL) {
			length = 0;
			string = NULL;
		} else {
			length = wcslen(str);