Skip to content
Tcl Source Code View Ticket
Login

View Ticket

backport ttkGenStubs.tcl features to genStubs.tcl

Closed / Fixed3034251fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2010-07-25 11:06:21
A few changes in ttkGenStubs.tcl are valid for Tcl as well.

# CHANGES: 
#+ Remove xxx_TCL_DECLARED #ifdeffery
#+ Remove dead code related to USE_*_STUB_PROCS (emitStubs, makeStub)
#+ Use void (*reserved$i)(void) = 0 instead of void *reserved$i = NULL
#  for unused stub entries, in case pointer-to-function and 
#  pointer-to-object are different sizes.

Since the firx for [Bug #803489], The mentioned #ifdeffery does not
serve any purpose in Tcl any more. It has brought more problems
than benefit, so ttkGenStubs.tcl is right in removing it altogether.

In addition, there are two more improvments:
- In stead of the ifdefferey, put an #ifdef __cplusplus guard, aground the
  definition of the stub pointer, so it can be used in C++ files as well.
- Make the "generic" argument in de *.decl files optional

Here is the patch. Of course, all *Decls.h and *InitStubs.c files need
to be re-generated.
nijtmansplain2010-07-25 18:06:22
File Added - 381053: genStubs.tcl.patch
nijtmansplain2010-08-19 11:32:37
ifdeffery and __cplusplus guard part committed in HEAD. All *Decls.h files re-generated.
nijtmansplain2010-11-07 15:18:56
allow_comments - 1
Log in (anonymous is fine) to add a comment.

Attachments: