Itk - the [incr Tk] extension

Check-in [bc0e48ab05]
Login

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

Overview
Comment:Update the idioms for stubs initialization.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | itk-4-0-1 | itk-4-0-1-rc
Files: files | file ages | folders
SHA1: bc0e48ab05ae6d04b78c0abf494b94734af99c59
User & Date: dgp 2015-02-26 18:44:25
Context
2015-07-29
10:01
In progress effort to repair context juggling. check-in: b41e9c4dc4 user: dgp tags: dgp-method-type
2015-03-11
17:48
merge release check-in: c9fc24de31 user: dgp tags: trunk
2015-02-26
18:44
Update the idioms for stubs initialization. Closed-Leaf check-in: bc0e48ab05 user: dgp tags: itk-4-0-1, itk-4-0-1-rc
2015-02-25
13:16
Regenerate stubs declarations to get C++ linkage right. check-in: 4f4a0bbb92 user: dgp tags: itk-4-0-1-rc
2015-02-24
15:49
Stop using the cargo cult idioms from ~2001 for Foo_InitStubs() calls. Closed-Leaf check-in: 983ca7876e user: dgp tags: dgp-initstubs
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/itkBase.c.

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
static int
Initialize(
    Tcl_Interp *interp)  /* interpreter to be updated */
{
    Tcl_Namespace *itkNs, *parserNs;
    ClientData parserInfo;

#ifndef USE_TCL_STUBS
fprintf(stderr, "NO STUBS\n");
    if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
      return TCL_ERROR;
    }
    if (Tcl_PkgRequire(interp, "Tk", TK_VERSION, 0) == NULL) {
      return TCL_ERROR;
    }
    if (Tcl_PkgRequire(interp, "itcl", ITCL_PATCH_LEVEL, 1) == NULL) {
      return TCL_ERROR;
    }
#else
    if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
fprintf(stderr, "ERROR in loading Tcl!%s!\n", Tcl_GetStringResult(interp));
      return TCL_ERROR;
    }
    if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
fprintf(stderr, "ERROR in loading TK!%s!\n", Tcl_GetStringResult(interp));
	return TCL_ERROR;
    };
    if (Itcl_InitStubs(interp, ITCL_PATCH_LEVEL, 0) == NULL) {
fprintf(stderr, "ERROR in loading Itcl!%s!\n", Tcl_GetStringResult(interp));
	return TCL_ERROR;
    }

#endif

    /*
     *  Add the "itk_option" ensemble to the itcl class definition parser.
     */
    parserNs = Tcl_FindNamespace(interp, "::itcl::parser",
        (Tcl_Namespace*)NULL, /* flags */ 0);

    if (!parserNs) {







<
<
<
<
<
<
<
<
<
<
<
<

<



<


|
<



<
<







114
115
116
117
118
119
120












121

122
123
124

125
126
127

128
129
130


131
132
133
134
135
136
137
static int
Initialize(
    Tcl_Interp *interp)  /* interpreter to be updated */
{
    Tcl_Namespace *itkNs, *parserNs;
    ClientData parserInfo;













    if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {

      return TCL_ERROR;
    }
    if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {

	return TCL_ERROR;
    };
    if (Itcl_InitStubs(interp, ITCL_VERSION, 0) == NULL) {

	return TCL_ERROR;
    }



    /*
     *  Add the "itk_option" ensemble to the itcl class definition parser.
     */
    parserNs = Tcl_FindNamespace(interp, "::itcl::parser",
        (Tcl_Namespace*)NULL, /* flags */ 0);

    if (!parserNs) {