equal
deleted
inserted
replaced
|
1 "{ Package: 'stx:libbasic' }" |
|
2 |
1 OSFileHandle subclass:#UnixFileHandle |
3 OSFileHandle subclass:#UnixFileHandle |
2 instanceVariableNames:'' |
4 instanceVariableNames:'' |
3 classVariableNames:'' |
5 classVariableNames:'' |
4 poolDictionaries:'' |
6 poolDictionaries:'' |
5 category:'OS-Unix' |
7 category:'OS-Unix' |
12 ! ! |
14 ! ! |
13 |
15 |
14 |
16 |
15 !UnixFileHandle methodsFor:'finalization'! |
17 !UnixFileHandle methodsFor:'finalization'! |
16 |
18 |
17 disposed |
19 closeFile |
18 "a file handle was garbage collected - close the underlying file" |
20 "close the underlying file" |
19 |
21 |
20 %{ |
22 %{ |
21 FILE *f = (FILE *)(__externalAddressVal(self)); |
23 FILE *f = (FILE *)(__externalAddressVal(self)); |
22 |
24 |
23 if (f) { |
25 if (f) { |
26 } |
28 } |
27 %} |
29 %} |
28 |
30 |
29 ! ! |
31 ! ! |
30 |
32 |
31 !UnixFileHandle methodsFor:'release'! |
|
32 |
|
33 close |
|
34 "close the file" |
|
35 |
|
36 %{ |
|
37 FILE *f = (FILE *)(__externalAddressVal(self)); |
|
38 |
|
39 if (f) { |
|
40 __externalAddressVal(self) = NULL; |
|
41 fclose(f); |
|
42 } |
|
43 %}. |
|
44 Lobby unregister:self |
|
45 |
|
46 ! ! |
|
47 |
|
48 !UnixFileHandle class methodsFor:'documentation'! |
33 !UnixFileHandle class methodsFor:'documentation'! |
49 |
34 |
50 version |
35 version |
51 ^ '$Header: /cvs/stx/stx/libbasic/UnixFileHandle.st,v 1.1 1999-09-18 11:10:52 cg Exp $' |
36 ^ '$Header: /cvs/stx/stx/libbasic/UnixFileHandle.st,v 1.2 2000-06-23 18:54:30 cg Exp $' |
52 ! ! |
37 ! ! |