/
handle.pmc
48 lines (33 loc) · 943 Bytes
/
handle.pmc
1
2
3
4
5
6
7
8
9
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
42
43
44
45
46
47
48
/*
Copyright (C) 2008, Parrot Foundation.
$Id$
=head1 NAME
src/pmc/handle.pmc - IO Handle PMC
=head1 DESCRIPTION
This is the base-class for all IO-related PMCs.
=head2 Vtable Functions
=over 4
=item * [to come]
=back
=cut
*/
#include "parrot/parrot.h"
#include "../src/io/io_private.h"
pmclass Handle provides Handle manual_attrs {
/* TODO: Consider encapsulating PIOHANDLE as a PMC type, for subclassing */
ATTR PIOHANDLE os_handle; /* Low level OS descriptor */
VTABLE void init() {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Handle cannot be instantiated directly.");
}
VTABLE void init_pmc(PMC * init) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Handle cannot be instantiated directly.");
}
}
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/