Tcl Source Code

View Ticket
Login
Ticket UUID: 926445
Title: make TCL_ALIGN file static?
Type: Bug Created on: 2004-03-31 05:20:09
Submitter: dgp Assigned to: msofer
Subsystem: 47. Bytecode Compiler Severity:
Priority: 5 Medium Last modified: 2004-05-04 03:01:09
Status: Closed Closed by: msofer
Resolution: Wont Fix Closed on: 2004-04-02 20:19:41
Version: obsolete: 8.5a2
Description:
It appears that the TCL_ALIGN()
macro is used only within
tclCompile.c .  Given that, how
about defining it there as well
(as ALIGN() ) and remove the
definition from tclInt.h ?
User Comments:
msofer added on 2004-04-03 02:22:50:
Logged In: YES 
user_id=148712

Why do the comments in the tests scan-11 refer to TCL_ALIGN?
Was the macro previously used by [scan]? To be checked.

msofer added on 2004-04-03 03:19:41:
Logged In: YES 
user_id=148712

Done.

dkf added on 2004-04-03 03:50:28:
Logged In: YES 
user_id=79902

In response to miguel's question, yes, the [scan] of Tcl 7.1
to 8.0 used TCL_ALIGN so it could use sscanf() internally -
it allocated a temporary buffer that all sscanf() results
were written to before being copied out into Tcl variables
(either with conversion to strings or to objects, depending
on whether you were in 7.* or 8.0).

Everything was rewritten for 8.1 because sscanf() couldn't
cope well with UTF-8 characters (or at least not on all
platforms.)

msofer added on 2004-05-04 03:01:09:
Logged In: YES 
user_id=148712

Reverted the fix: tbcload at least requires the macro, so we
keep it in tclInt.h for its sake.