author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 11 Oct 2011 16:53:59 +0100 | |
branch | jv |
changeset 17883 | 209190914636 |
parent 17846 | 24edc476ac18 |
child 17892 | d86c8bd5ece3 |
permissions | -rw-r--r-- |
4762 | 1 |
OSFileHandle subclass:#OpenVMSFileHandle |
2 |
instanceVariableNames:'' |
|
3 |
classVariableNames:'' |
|
4 |
poolDictionaries:'' |
|
5 |
category:'OS-OpenVMS' |
|
6 |
! |
|
7 |
||
8 |
!OpenVMSFileHandle primitiveDefinitions! |
|
9 |
%{ |
|
10 |
#include <stdio.h> |
|
11 |
%} |
|
12 |
||
13 |
! ! |
|
14 |
||
15 |
||
16 |
!OpenVMSFileHandle methodsFor:'finalization'! |
|
17 |
||
18 |
disposed |
|
19 |
"a file handle was garbage collected - close the underlying file" |
|
20 |
||
21 |
%{ |
|
22 |
FILE *f = (FILE *)(__externalAddressVal(self)); |
|
23 |
||
24 |
if (f) { |
|
25 |
__externalAddressVal(self) = NULL; |
|
26 |
fclose(f); |
|
27 |
} |
|
28 |
%} |
|
29 |
||
30 |
||
31 |
||
32 |
! ! |
|
33 |
||
34 |
!OpenVMSFileHandle methodsFor:'release'! |
|
35 |
||
36 |
close |
|
37 |
"close the file" |
|
38 |
||
39 |
%{ |
|
40 |
FILE *f = (FILE *)(__externalAddressVal(self)); |
|
41 |
||
42 |
if (f) { |
|
43 |
__externalAddressVal(self) = NULL; |
|
44 |
fclose(f); |
|
45 |
} |
|
46 |
%}. |
|
47 |
Lobby unregister:self |
|
48 |
||
49 |
||
50 |
||
51 |
! ! |
|
52 |
||
53 |
!OpenVMSFileHandle class methodsFor:'documentation'! |
|
54 |
||
55 |
version |
|
17883
209190914636
svn:keywords property set correctly
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17846
diff
changeset
|
56 |
^ '$Id: OpenVMSFileHandle.st 10717 2011-10-11 15:53:59Z vranyj1 $' |
17846 | 57 |
! ! |