ObjFW  Diff

Differences From Artifact [ff18537f89]:

To Artifact [432d090484]:


10
11
12
13
14
15
16

17

18
19
20
21
22
23
24
25
26

27
28
29
30
31
32
33
34
35
36
37
38
39
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */


#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







>
|
>

|





<
|
>













10
11
12
13
14
15
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
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <stdlib.h>

#import "OFSeekableStream.h"

@implementation OFSeekableStream
- (void)lowlevelSeekToOffset: (off_t)offset
		      whence: (int)whence
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

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

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