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
52 described in the Tcl command pages for each of the memchan commands.
53 The Tcl commands internally call these functions to create the chan‐
54 nels.
55
56 The memchan channel accepts an initialSize argument to permit pre-allo‐
57 cating space for the internal buffer. Normally this may be set to 0.
58
59 The fifo2 API function looks a little different because it must return
60 two linked channels.
61
63 Tcl_GetChannelName
64
66 Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
67
68
69
70
71Memory channels 2.2 memchan(n)