Itk - the [incr Tk] extension

Check-in [983ca7876e]
Login

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

Overview
Comment:Stop using the cargo cult idioms from ~2001 for Foo_InitStubs() calls.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dgp-initstubs
Files: files | file ages | folders
SHA1: 983ca7876e426f50d6b6b51472209f851ebb81ba
User & Date: dgp 2015-02-24 15:49:18
Context
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-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
15:28
remove unreachable code check-in: 96f440d6e8 user: dgp tags: itk-4-0-1-rc
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) {