Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 47f4a43c4fb5c4a62ac687f96b919c830594a786cafa64df463994fae7f61608
Ticket: 2c519736077ac092dbbce446759063f5f8427084
Having Tcl_WrongNumArgs return TCL_ERROR makes extension writing a little nicer
User & Date: oehhar on 2018-07-05 06:26:19
Changes

  1. icomment:
    Hi,
    
    thank you for the proposition which looks beautiful at a first glance.
    
    IMHO any function should return the status of itself.
    
    There might be a lot of troubble inside Tcl_WrongNumArgs which may be reported:
    
       *   Invalid interpreter
       *   Invalid objv
       *   Position number out of range
    
    I would prefer, that the function returns an error instead of returnin a convenience value.
    
    If you prefer, you may also define a macro or an inline proc to beautify your code. Or use the solution by Sergey.
    
    Harald
    
  2. login: "oehhar"
  3. mimetype: "text/x-fossil-wiki"
  4. username: "oehhar"