[Python-bugs-list] [ python-Bugs-719880 ] _tkinter.c doesn't build on Redhat 9

SourceForge.net noreply@sourceforge.net
Fri, 11 Apr 2003 13:38:49 -0700


Bugs item #719880, was opened at 2003-04-11 15:12
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=719880&group_id=5470

Category: Build
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Martin v. Löwis (loewis)
Summary: _tkinter.c doesn't build on Redhat 9

Initial Comment:
Martin, _tkinter doesn't build on Redhat 9 because:
 _tkinter.c:92:2: #error "unsupported Tcl configuration"

TCL_UTF_MAX is defined to be 6, not 3.  I don't know
what else would be necessary to change to get this to
work.  Can you provide any ideas? 

I changed line 92 to:

    #if TCL_UTF_MAX != 3 && TCL_UTF_MAX != 6

and I was able to bring a window up with a push button.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-04-11 16:38

Message:
Logged In: YES 
user_id=33168

Tcl/Tk version is 8.3.5. There were some warnings from
AsObj.  I'll look into this in more detail later.  I may ask
the redhat guys to take a look too.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-04-11 16:08

Message:
Logged In: YES 
user_id=21627

What Tcl version is that? I didn't know Tcl does UCS-4...

The comment says it all: Tcl_Unichar is expected to be two
bytes. If it isn't, and
a) Python is UCS-2: In AsObj, deal with surrogates in the
Python 
string, combining them into a single Tcl_Unichar. In
FromObj, split
non-BMP characters into two. This means that you need a copying
loop, as you cannot expect that the size of the Tcl and Python
strings will be the same.
b) Python is UCS-4. Consider also using
PyUnicode_FromUnicode in FromObj, and NewUnicodeObj in AsObj.

Alternatively, proclaim that "Tcl is UCS-4, Python is UCS-2"
is not supported, drop case a), and perform just the direct
operations in case b) (the current copying loops are still
needed for UCS-2 Tcl).

Perhaps Tcl isn't UCS-4, but uses surrogate pairs instead?
In that case, one would need to use yet other algorithms...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=719880&group_id=5470