Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 20e416e34b7e35d1737db9ad9c369706ec94b4a9b4b001d0f9801a180b75e1cc
Ticket: 844b0ebe515862ee40ecffa2098d3588532fea0a
tclstub : interpreter uses an incompatible stubs mechanism
User & Date: anonymous on 2024-12-11 12:44:22
Changes

  1. closedate changed to: "2460656.03082101"
  2. closer changed to: "anonymous"
  3. icomment:
    Ashok, 
    
    > The error occurs because the *actual* C function `Tcl_InitStubs` has changed in Tcl 9. It now takes 4 parameters, not 3 as in 8.6.
    
    I used this value to define :
    ```
    TCL_STUB_MAGIC ((int) 0xFCA3BACB + (int) sizeof(void *))
    ```
    
    Unfortunately for me this still doesn't work, same error : _"interpreter uses an incompatible stubs mechanism"_, where I'm surprised is that I didn't have a 'segmentation fault' rather than the usual error. 
    
    Unless _tclstub.lib_ automatically defines this pragma : __USE_TCL_STUBS__
    I think I'm in that [case](https://core.tcl-lang.org/tcl/file?ci=tip&name=generic/tcl.h&ln=2362-2366) in tcl.h.   
    If I'm right I end up with almost the same configuration defined in Tcl8.X which is defined like this in tcl8.X.h :  
     
    ```
    #ifndef USE_TCL_STUBS
    #define Tcl_InitStubs(interp, version, exact) \
        Tcl_PkgInitStubsCheck(interp, version, exact)
    #endif
    ```   
    
    As you well know, I don't know __C__ and I'm learning the __Nim__ language.   
    I'll try to get in contact with a Nim expert to make sure I've defined the right things.   
    
    In any case, thank you for going outside the scope of my question and looking into my code. 
    
    Thanks (again)
    
  4. login: "anonymous"
  5. mimetype: "text/x-markdown"