Check-in [e6ab988ad4]
Overview
Comment:Create a Tcl_Init() symbol if we are creating a static libtclkit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | feature-kitdll-static
Files: files | file ages | folders
SHA1:e6ab988ad474cefc424de39ff4de1ea63c9376ff
User & Date: rkeene on 2016-02-24 20:41:54
Other Links: manifest | tags
Context
2016-02-24
20:52
Merged in support for creating a static KitDLL check-in: 3fc6a2107a user: rkeene tags: trunk
20:41
Create a Tcl_Init() symbol if we are creating a static libtclkit Closed-Leaf check-in: e6ab988ad4 user: rkeene tags: feature-kitdll-static
20:26
Created a mechanism for specifying which KitDLL to build check-in: eb5004bca0 user: rkeene tags: feature-kitdll-static
Changes

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [3cb384a768] to [f888dda2c4].

   567    567    * are ready to be used when invoked.
   568    568    */
   569    569   #ifdef TCLKIT_DLL
   570    570   void __attribute__((constructor)) _Tclkit_Init(void) {
   571    571   #else
   572    572   static void _Tclkit_Init(void) {
   573    573   #endif
          574  +	static int called = 0;
          575  +
          576  +	if (called) {
          577  +		return;
          578  +	}
          579  +
          580  +	called = 1;
          581  +
   574    582   	Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL);
   575    583   
   576    584   	_Tclkit_Generic_Init();
   577    585   
   578    586   	return;
   579    587   }
          588  +
          589  +#if defined(TCLKIT_DLL) && defined(TCLKIT_DLL_STATIC)
          590  +int Tcl_InitReal(Tcl_Interp *interp);
          591  +
          592  +int Tcl_Init(Tcl_Interp *interp) {
          593  +	_Tclkit_Init();
          594  +
          595  +	return(Tcl_InitReal(interp));
          596  +}
          597  +#endif