ObjFW  Diff

Differences From Artifact [3a3c16de1f]:

To Artifact [ff18537f89]:


16
17
18
19
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

#import "OFSeekableStream.h"

#import "OFNotImplementedException.h"

@implementation OFSeekableStream
- (void)lowlevelSeekToOffset: (off_t)offset
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

- (off_t)lowlevelSeekForwardWithOffset: (off_t)offset
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

- (off_t)lowlevelSeekToOffsetRelativeToEnd: (off_t)offset
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

- (void)seekToOffset: (off_t)offset

{
	[self lowlevelSeekToOffset: offset];

	[self freeMemory: cache];
	cache = NULL;
	cacheLength = 0;
}

- (off_t)seekForwardWithOffset: (off_t)offset
{
	off_t ret;

	ret = [self lowlevelSeekForwardWithOffset: offset - cacheLength];

	[self freeMemory: cache];
	cache = NULL;
	cacheLength = 0;

	return ret;
}

- (off_t)seekToOffsetRelativeToEnd: (off_t)offset
{
	off_t ret;

	ret = [self lowlevelSeekToOffsetRelativeToEnd: offset];

	[self freeMemory: cache];
	cache = NULL;
	cacheLength = 0;

	return ret;
}
@end







<
<
<
<
|
<





<
<
<
<
<
<

>

|
|
<
<
<
|
<
<
<
<
<
<
<



|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

16
17
18
19
20
21
22




23

24
25
26
27
28






29
30
31
32
33



34







35
36
37
38















39

#import "OFSeekableStream.h"

#import "OFNotImplementedException.h"

@implementation OFSeekableStream
- (void)lowlevelSeekToOffset: (off_t)offset




		      whence: (int)whence

{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}







- (void)seekToOffset: (off_t)offset
	      whence: (int)whence
{
	[self lowlevelSeekToOffset: offset
			    whence: whence];











	[self freeMemory: cache];
	cache = NULL;
	cacheLength = 0;
}















@end