ObjFW  Diff

Differences From Artifact [b6f607f8d4]:

To Artifact [e4b0bd482e]:


40
41
42
43
44
45
46





47
48
49
50
51
52
53
/* References for static linking */
void _references_to_categories_of_OFDataArray(void)
{
	_OFDataArray_Hashing_reference = 1;
};

@implementation OFDataArray





+ dataArrayWithItemSize: (size_t)itemSize
{
	return [[[self alloc] initWithItemSize: itemSize] autorelease];
}

+ dataArrayWithContentsOfFile: (OFString*)path
{







>
>
>
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* References for static linking */
void _references_to_categories_of_OFDataArray(void)
{
	_OFDataArray_Hashing_reference = 1;
};

@implementation OFDataArray
+ dataArray
{
	return [[[self alloc] init] autorelease];
}

+ dataArrayWithItemSize: (size_t)itemSize
{
	return [[[self alloc] initWithItemSize: itemSize] autorelease];
}

+ dataArrayWithContentsOfFile: (OFString*)path
{
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
78
79
80


81
82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
+ dataArrayWithBase64EncodedString: (OFString*)string
{
	return [[[self alloc] initWithBase64EncodedString: string] autorelease];
}

- init
{
	Class c = isa;
	[self release];

	@throw [OFNotImplementedException newWithClass: c
					      selector: _cmd];
}

- initWithItemSize: (size_t)itemSize_
{
	self = [super init];

	@try {
		if (itemSize_ == 0)


			@throw [OFInvalidArgumentException newWithClass: isa
							       selector: _cmd];

		itemSize = itemSize_;
		data = NULL;
	} @catch (id e) {
		[self release];
		@throw e;
	}


	return self;
}

- initWithContentsOfFile: (OFString*)path
{
	self = [super init];







|
|
>
|
|






<
|
>
>
|
|
|
<
<
<
<
<
|
>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

85
86
87
88
89
90





91
92
93
94
95
96
97
98
99
+ dataArrayWithBase64EncodedString: (OFString*)string
{
	return [[[self alloc] initWithBase64EncodedString: string] autorelease];
}

- init
{
	self = [super init];

	itemSize = 1;

	return self;
}

- initWithItemSize: (size_t)itemSize_
{
	self = [super init];


	if (itemSize_ == 0) {
		Class c = isa;
		[self release];
		@throw [OFInvalidArgumentException newWithClass: c
						       selector: _cmd];
	}






	itemSize = itemSize_;

	return self;
}

- initWithContentsOfFile: (OFString*)path
{
	self = [super init];