[TT #871] Add rand as a dynop, with tests
[parrot.git] / src / pmc / handle.pmc
blobc8f2ac0a4ef9dfcffd1cc2d95e92b60aa85659f4
1 /*
2 Copyright (C) 2008, Parrot Foundation.
3 $Id$
5 =head1 NAME
7 src/pmc/handle.pmc - IO Handle PMC
9 =head1 DESCRIPTION
11 This is the base-class for all IO-related PMCs.
13 =head2 Vtable Functions
15 =over 4
17 =item * [to come]
19 =back
21 =cut
25 #include "parrot/parrot.h"
26 #include "../src/io/io_private.h"
28 pmclass Handle provides Handle {
29     /* TODO: Consider encapsulating PIOHANDLE as a PMC type, for subclassing */
30     ATTR PIOHANDLE os_handle;         /* Low level OS descriptor      */
32     VTABLE void init() {
33         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
34             "Handle cannot be instantiated directly.");
35     }
37     VTABLE void init_pmc(PMC * init) {
38         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
39             "Handle cannot be instantiated directly.");
40     }
44  * Local variables:
45  *   c-file-style: "parrot"
46  * End:
47  * vim: expandtab shiftwidth=4:
48  */