1memchan(n) memchan(n)
2
3
4
5______________________________________________________________________________
6
8 memchan - C API for creating memory channels
9
11 package require Tcl
12
13 package require memchan
14
15 Tcl_Channel Memchan_CreateMemoryChannel (Tcl_Interp *interp, int ini‐
16 tialSize)
17
18 Tcl_Channel Memchan_CreateFifoChannel (Tcl_Interp *interp)
19
20 void Memchan_CreateFifo2Channel (Tcl_Interp *interp, Tcl_Channel *aPtr,
21 Tcl_Channel *bPtr)
22
23 Tcl_Channel Memchan_CreateNullChannel (Tcl_Interp *interp)
24
25 Tcl_Channel Memchan_CreateZeroChannel (Tcl_Interp *interp)
26
27 Tcl_Channel Memchan_CreateRandomChannel (Tcl_Interp *interp)
28
29______________________________________________________________________________
30
32 The memchan package provides a C API for use by third-party extension
33 writers. This is exposed by a Tcl stubs library table to reduce version
34 dependency as is available for Tcl itself.
35
37 Tcl_Channel Memchan_CreateMemoryChannel (Tcl_Interp *interp, int ini‐
38 tialSize)
39
40 Tcl_Channel Memchan_CreateFifoChannel (Tcl_Interp *interp)
41
42 void Memchan_CreateFifo2Channel (Tcl_Interp *interp, Tcl_Channel *aPtr,
43 Tcl_Channel *bPtr)
44
45 Tcl_Channel Memchan_CreateNullChannel (Tcl_Interp *interp)
46
47 Tcl_Channel Memchan_CreateZeroChannel (Tcl_Interp *interp)
48
49 Tcl_Channel Memchan_CreateRandomChannel (Tcl_Interp *interp)
50
51 Each of these functions creates an returns a channel exactly as de‐
52 scribed in the Tcl command pages for each of the memchan commands. The
53 Tcl commands internally call these functions to create the channels.
54
55 The memchan channel accepts an initialSize argument to permit pre-allo‐
56 cating space for the internal buffer. Normally this may be set to 0.
57
58 The fifo2 API function looks a little different because it must return
59 two linked channels.
60
62 Tcl_GetChannelName
63
65 Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
66
67
68
69
70Memory channels 2.2 memchan(n)