Overview
| Artifact ID: | 4c359eb069173f65861b3a533e008c0c1c569b369804e208b62b6259c5ae87e3 |
|---|---|
| Ticket: | 290bfe463c36c9cb05e3bf06254cbbc694d29dbd
Define for Tcl_Size not present when compiling against Tcl 8.6.17 |
| User & Date: | oehhar on 2025-11-25 10:25:28 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
This wiki page [https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9&p] states: "Tcl_Size" itself doesn't need to be provided as long as you update the extension to the latest tclconfig release. TEA (latest tcl.m4/rules.vc files) takes care of providing an appropriate preprocessor #define for Tcl_Size. I tried this to comply to this ticket [https://github.com/tcltk-depot/tksvg/issues/27]. I replaced TkSizeT by Tcl_Size. The compilation using makefile.vc and MS-VC6 32 bit on MS-Win 11 64 bit states: <verbatim> C:\test\git\tksvg\win\..\generic\tkImgSVG.c(93) : error C2146: syntax error : missing ')' before identifier 'length' C:\test\git\tksvg\win\..\generic\tkImgSVG.c(93) : error C2081: 'Tcl_Size' : name in formal parameter list illegal </verbatim> I looked, if Tcl_Size is given by a define as stated by the wiki page. The compiler invocation has no "-D Tcl_Size". <verbatim> cl -nologo -c /D_ATL_XP_TARGETING /DHAVE_CPUID=1 -W3 -wd4090 -wd4146 -FpC:\test\git\tksvg\win\Release\tksvg_ThreadedDynamic\ -Op -QI0f -O2 -YX -MD -I"C:\test\tcl8.6.17\tcl8.6.17\generic" -I"C:\test\tcl8.6.17\tcl8.6.17\win" -I"C:\test\tcl8.6.17\tk8.6.17\generic" -I"C:\test\tcl8.6.17\tk8.6.17\win" -I"C:\test\tcl8.6.17\tk8.6.17\xlib" -I"C:\test\git\tksvg\win\..\generic" -I"C:\test\git\tksvg\win\..\win" -I"C:\test\git\tksvg\win\..\compat" -Dinline=__inline /DSTDC_HEADERS /DUSE_NMAKE=1 /DMP_NO_STDINT=1 /DTCL_THREADS=1 /DUSE_THREAD_ALLOC=1 /DNDEBUG /DTCL_CFG_OPTIMIZED /DNO_STRTOI64=1 /DUSE_TCL_STUBS /DUSE_TCLOO_STUBS /DUSE_TK_STUBS /DPACKAGE_NAME="\"tksvg\"" /DPACKAGE_TCLNAME="\"tksvg\"" /DPACKAGE_VERSION="\"0.15\"" /DMODULE_SCOPE=extern /DBUILD_tksvg -FoC:\test\git\tksvg\win\Release\tksvg_ThreadedDynamic\ @C:\Users\oehhar\AppData\Local\Temp\nmc09512. </verbatim> So, how should this work ? Paul wrote, that the "Tcl_Size Magic Code" has to be integrated. This code is: <verbatim> #ifndef TCL_SIZE_MAX #include <limits.h> #define TCL_SIZE_MAX INT_MAX #ifndef Tcl_Size typedef int Tcl_Size; #endif #define TCL_SIZE_MODIFIER "" #define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj #endif </verbatim> Why is this not stated on the wiki page? Thanks for all, Harald - foundin changed to: "8.6.17"
- is_private changed to: "0"
- login: "oehhar"
- priority changed to: "5 Medium"
- private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "oehhar"
- subsystem changed to: "- New Builtin Commands"
- title changed to:
Define for Tcl_Size not present when compiling against Tcl 8.6.17
- type changed to: "Bug"