eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Add Tcl 9 compatibility

Open DasBrain opened this issue 1 year ago • 0 comments

Found by: n/a Patch by: DasBrain Fixes: #1532

One-line summary: Makes eggdrop compatible with Tcl 9.0b1

Additional description (if needed): init_tcl has been split into 2 parts:

  1. init_tcl0 sets the notifier, calls Tcl_FindExecutable and if Tcl >= 9 calls Tcl_InitSubsystem.
  2. init_tcl1 does the rest. init_tcl0 must be called before the thread local storage is used.

Tests show that this compiles and runs with both Tcl 8.6.11 and Tcl 9.0b1.

Following minor changes have been made:

  • Replace TCL_INTERP_DESTROYED with Tcl_InterpDeleted() (also see #1537)
  • Define EGG_CONST as const (CONST is gone)
  • Introduce Tcl_Size - which is typedef int Tcl_Size if not provided by tcl.h
  • Update variable types to Tcl_Size where needed.
  • Replace Tcl_DStringTrunc with Tcl_DStringSetLength

Test cases demonstrating functionality (if applicable):

  • [Tcl9Eggdrop] (): Running Eggdrop 1.9.5+python 1090505 with Tcl 9.0b
  • [Tcl8Eggdrop] (): Running Eggdrop 1.9.5+python 1090505 with Tcl 8.6.

DasBrain avatar Feb 20 '24 13:02 DasBrain