1
2memchan(n)                                                          memchan(n)
3
4
5

NAME

7       memchan - C API for creating memory channels
8

SYNOPSIS

10       package require Tcl
11
12       package require memchan
13
14       Tcl_Channel  Memchan_CreateMemoryChannel  (Tcl_Interp *interp, int ini‐
15       tialSize)
16
17       Tcl_Channel Memchan_CreateFifoChannel (Tcl_Interp *interp)
18
19       void Memchan_CreateFifo2Channel (Tcl_Interp *interp, Tcl_Channel *aPtr,
20       Tcl_Channel *bPtr)
21
22       Tcl_Channel Memchan_CreateNullChannel (Tcl_Interp *interp)
23
24       Tcl_Channel Memchan_CreateZeroChannel (Tcl_Interp *interp)
25
26       Tcl_Channel Memchan_CreateRandomChannel (Tcl_Interp *interp)
27
28

DESCRIPTION

30       The  memchan  package provides a C API for use by third-party extension
31       writers. This is exposed by a Tcl stubs library table to reduce version
32       dependency as is available for Tcl itself.
33

COMMAND

35       Tcl_Channel  Memchan_CreateMemoryChannel  (Tcl_Interp *interp, int ini‐
36       tialSize)
37
38       Tcl_Channel Memchan_CreateFifoChannel (Tcl_Interp *interp)
39
40       void Memchan_CreateFifo2Channel (Tcl_Interp *interp, Tcl_Channel *aPtr,
41       Tcl_Channel *bPtr)
42
43       Tcl_Channel Memchan_CreateNullChannel (Tcl_Interp *interp)
44
45       Tcl_Channel Memchan_CreateZeroChannel (Tcl_Interp *interp)
46
47       Tcl_Channel Memchan_CreateRandomChannel (Tcl_Interp *interp)
48
49       Each  of  these  functions  creates  an  returns  a  channel exactly as
50       described in the Tcl command pages for each of  the  memchan  commands.
51       The  Tcl  commands  internally call these functions to create the chan‐
52       nels.
53
54       The memchan channel accepts an initialSize argument to permit pre-allo‐
55       cating space for the internal buffer. Normally this may be set to 0.
56
57       The  fifo2 API function looks a little different because it must return
58       two linked channels.
59

SEE ALSO

61       Tcl_GetChannelName
62
64       Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
65
66
67
68Memory channels                       2.2                           memchan(n)
Impressum