Check-in [765a81ec0f]
Overview
Comment:When compiling with stubs enabled, also define Tcl_InitStubs()
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 765a81ec0ff84c94da1ddbb62b912224a5022d2b
User & Date: rkeene on 2017-10-17 03:07:49
Other Links: manifest | tags
Context
2017-10-17
03:33
Added support for calling "add_file" (undocumented for now) check-in: cd4a58d22b user: rkeene tags: trunk
03:07
When compiling with stubs enabled, also define Tcl_InitStubs() check-in: 765a81ec0f user: rkeene tags: trunk
2017-10-13
20:37
tcc4tcl 0.30 check-in: 215571a61c user: rkeene tags: trunk, 0.30
Changes

Modified tcc4tcl.c from [2f5bd45b79] to [6954747816].

285
286
287
288
289
290
291
292
293

294
295
296
297
298
299
300
	s = tcc_new(Tcl_GetString(objv[1]));
	if (s == NULL) {
		return(TCL_ERROR);
	}

#ifdef USE_TCL_STUBS
	if (index == TCC_OUTPUT_MEMORY) {
		/* Only add this symbol if we are compiling to memory */
		tcc_add_symbol(s, "tclStubsPtr", &tclStubsPtr);

	}

	tcc_define_symbol(s, "USE_TCL_STUBS", "1");
#endif

	tcc_set_error_func(s, interp, (void *)&Tcc4tclErrorFunc);








|

>







285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
	s = tcc_new(Tcl_GetString(objv[1]));
	if (s == NULL) {
		return(TCL_ERROR);
	}

#ifdef USE_TCL_STUBS
	if (index == TCC_OUTPUT_MEMORY) {
		/* Only add these symbols if we are compiling to memory */
		tcc_add_symbol(s, "tclStubsPtr", &tclStubsPtr);
		tcc_add_symbol(s, "Tcl_InitStubs", &Tcl_InitStubs);
	}

	tcc_define_symbol(s, "USE_TCL_STUBS", "1");
#endif

	tcc_set_error_func(s, interp, (void *)&Tcc4tclErrorFunc);