Skip to content
Tcl Source Code Artifact [f36360d447]
Login

Artifact [f36360d447]

Artifact f36360d44734bedcf74dca369605eed7be15a298:

Ticket change [f36360d447] - Ticket [3588687fffffffff|3588687fff] <i>Tcl_InitStubs() Broken As Designed</i> status still Open with 4 other changes by nijtmans on 2012-12-07 02:02:36.
D 2012-12-07T02:02:36
J icomment The\svalue\sof\sa\sseparate\stclStubLibCompat.c\sis,\sthat\sit\scan\sbe\sleft\nout\swhen\sthe\sstub\slibrary\sis\slinked\susing\sTcl\s9\sheaders.\sI\sam\strying\nto\sreach\sthe\sgoal\sof\sa\sversion-independant\sstub\slibrary,\sthe\sdifference\nis\sin\stcl.h\sonly.\n\nThe\sminimum\srequirement\sof\sTcl_PkgRequireEx\sto\swork\sis\sthat:\n-\sthe\sentry\sin\sthe\sstub\stable\sstays\sthe\ssame\n-\sthe\ssignature\sof\sTcl_PkgRequireEx\sstays\sthe\ssame.\nI\ssee\sno\sreason\sto\schange\sthe\sentry\sor\sthe\ssignature,\nso\sthere\sis\sno\smagic\scheck\sneeded\sto\smake\sit\swork\sfor\nsure.\sThe\sadditional\schecks\sare\smeaningless\sIMHO.\n\nThe\sreal\sproblem\sis\sthe\ssignature\schange\sin\sother\nfunctions,\swhich\sare\snot\sused\sin\sthe\sstub\slibrary,\nsuch\sas\sTcl_EvalEx().\sOr\sin\sthe\sTcl_Obj\sstructure,\nwhich\swill\s(I\sassume)\schange\sthe\slength\sfield\nfrom\sint\sto\ssize_t.\sOn\s32-bit\splatforms\sthat\sdoesn't\nmake\sa\sdifference\s(all\sthose\stypes\sare\s32-bit)\sbut\non\s64-bit\splatforms\sit\stotally\sbreaks.\sTherefore\sI\npropose\sto\schange\sthe\smagic\svalue\sfrom\n\s\s\s\s\s(int)\s0xFCA3BACF\nto\n\s\s\s\s\s(int)\s(0xFCA3BACB\s+\ssizeof(size_t))\nThen\sthe\smagic\svalue\son\s32-bit\splatforms\sstays\nthe\ssame,\son\s64-bit\splatforms\sit\schanges.\sThen\nthe\scurrent\scheck\ssuffices\sto\sdetect\sthe\sproblem.\n\nSo,\sI\sagree\swith\syou\s-\sas\syou\sstated\searlier:\n>Since\sI'd\sprefer\snot\sto\schange\sthe\sTCL_STUBS_MAGIC\svalue\nI\sprefer\snot\sto\schange\sthe\sTCL_STUBS_MAGIC\nas\swell.\sBut\sstriving\sfor\sa\sversion-independant\nstub\slibrary,\son\s64-bit\splatforms\sI\sdon't\ssee\nanother\spossibility.\sOn\s32-bit\splatforms\sI\ndon't\ssee\sa\sreason\sto\schange\sit.\n
J login nijtmans
J mimetype text/plain
J username nijtmans
K 3588687fffffffffffffffffffffffffffffffff
U nijtmans
Z b7f2b00d44b5b3c0a1f2936e0d9dd3ac