Tcl Source Code

Check-in [a60ff8b20d]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:
* doc/load.n: Backport corrected example.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-4-branch
Files: files | file ages | folders
SHA1: a60ff8b20d5be5d09e90d396997ccea4dc7f0b39
User & Date: dgp 2007-09-20 16:24:44
Context
2007-09-20
17:55
document --enable-dtrace configure option check-in: 780ab807ba user: das tags: core-8-4-16, core-8-4-branch
16:24
* doc/load.n: Backport corrected example.
check-in: a60ff8b20d user: dgp tags: core-8-4-branch
2007-09-19
16:08
* unix/Makefile.in: Update `make dist` so that tclDTrace.d is included in the so...
check-in: 6ab7aab08c user: dgp tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

1
2
3
4




5
6
7
8
9
10
11
2007-09-19  Don Porter  <[email protected]>

	*** 8.4.16 TAGGED FOR RELEASE ***





	* unix/Makefile.in:     Update `make dist` so that tclDTrace.d is
	included in the source code distribution.

	* generic/tclPkg.c:	Backport fix for [1573844] to the
	* tests/pkg.test:	TCL_TIP268 sections.

2007-09-18  Don Porter  <[email protected]>
|



>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2007-09-20  Don Porter  <[email protected]>

	*** 8.4.16 TAGGED FOR RELEASE ***

	* doc/load.n:	Backport corrected example.

2007-09-19  Don Porter  <[email protected]sers.sourceforge.net>

	* unix/Makefile.in:     Update `make dist` so that tclDTrace.d is
	included in the source code distribution.

	* generic/tclPkg.c:	Backport fix for [1573844] to the
	* tests/pkg.test:	TCL_TIP268 sections.

2007-09-18  Don Porter  <[email protected]>

Changes to doc/load.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
...
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
...
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @(#) $Id: load.n,v 1.7.2.1 2004/10/27 12:52:40 dkf Exp $
'\" 
.so man.macros
.TH load n 7.5 Tcl "Tcl Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
load \- Load machine code and initialize new commands.
................................................................................
.SH EXAMPLE
The following is a minimal extension:
.PP
.CS
#include <tcl.h>
#include <stdio.h>
static int fooCmd(ClientData clientData,
        Tcl_Interp *interp, int objc, char * CONST objv[]) {
    printf("called with %d arguments\\n", objc);
    return TCL_OK;
}
int Foo_Init(Tcl_Interp *interp) {
    if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
	return TCL_ERROR;
    }
................................................................................
(e.g. \fBfoo.dll\fR on Windows, \fBlibfoo.so\fR on Solaris and Linux)
it can then be loaded into Tcl with the following:
.PP
.CS
# Load the extension
switch $tcl_platform(platform) {
   windows {
      \fBload\fR ./foo.dll
   }
   unix {
      \fBload\fR ./libfoo[info sharedlibextension]
   }
}

# Now execute the command defined by the extension
foo
.CE

.SH "SEE ALSO"
info sharedlibextension, Tcl_StaticPackage(3), safe(n)

.SH KEYWORDS
binary code, loading, safe interpreter, shared library





|







 







|







 







|


|












1
2
3
4
5
6
7
8
9
10
11
12
13
14
...
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
...
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @(#) $Id: load.n,v 1.7.2.2 2007/09/20 16:24:46 dgp Exp $
'\" 
.so man.macros
.TH load n 7.5 Tcl "Tcl Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
load \- Load machine code and initialize new commands.
................................................................................
.SH EXAMPLE
The following is a minimal extension:
.PP
.CS
#include <tcl.h>
#include <stdio.h>
static int fooCmd(ClientData clientData,
        Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) {
    printf("called with %d arguments\\n", objc);
    return TCL_OK;
}
int Foo_Init(Tcl_Interp *interp) {
    if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
	return TCL_ERROR;
    }
................................................................................
(e.g. \fBfoo.dll\fR on Windows, \fBlibfoo.so\fR on Solaris and Linux)
it can then be loaded into Tcl with the following:
.PP
.CS
# Load the extension
switch $tcl_platform(platform) {
   windows {
      \fBload\fR [file join [pwd] foo.dll]
   }
   unix {
      \fBload\fR [file join [pwd] libfoo[info sharedlibextension]]
   }
}

# Now execute the command defined by the extension
foo
.CE

.SH "SEE ALSO"
info sharedlibextension, Tcl_StaticPackage(3), safe(n)

.SH KEYWORDS
binary code, loading, safe interpreter, shared library