restore SCHEME_INPORT_VAL and SCHEME_OUTPORT_VAL

This commit is contained in:
Matthew Flatt 2016-08-13 13:33:55 -06:00
parent 21d5d909a6
commit c9da43378f
2 changed files with 8 additions and 2 deletions

View File

@ -186,13 +186,15 @@ types:
extracts/sets the user data pointer; test for just this type with
@cppdef{SCHEME_INPORTP}, but use @cppdef{SCHEME_INPUT_PORTP} to recognize
all input ports (including structures with the
@racket[prop:input-port] property)}
@racket[prop:input-port] property), and use @cppi{scheme_input_port_record}
to extract a @cppi{scheme_input_port_type} value from a general input port}
@item{@cppdef{scheme_output_port_type} --- @cppdef{SCHEME_OUTPORT_VAL}
extracts/sets the user data pointer; test for just this type with
@cppdef{SCHEME_OUTPORTP}, but use @cppdef{SCHEME_OUTPUT_PORTP} to
recognize all output ports (including structures with the
@racket[prop:output-port] property)}
@racket[prop:output-port] property), and use @cppi{scheme_output_port_record}
to extract a @cppi{scheme_output_port_type} value from a general input port}
@item{@cppdef{scheme_thread_type} --- thread descriptors; test for
this type with @cppdef{SCHEME_THREADP}}

View File

@ -1543,6 +1543,8 @@ struct Scheme_Input_Port
#endif
};
#define SCHEME_INPORT_VAL(i) (((Scheme_Input_Port *)i)->port_data)
struct Scheme_Output_Port
{
struct Scheme_Port p;
@ -1566,6 +1568,8 @@ struct Scheme_Output_Port
struct Scheme_Input_Port *input_half;
};
#define SCHEME_OUTPORT_VAL(o) (((Scheme_Output_Port *)o)->port_data)
#define SCHEME_SPECIAL (-2)
#define SCHEME_UNLESS_READY (-3)