Tcl_ProcObjCmd() workings 
Author Message
 Tcl_ProcObjCmd() workings

I'm trying to understand the working of Tcl_ProcObjCmd(), but there's
one thing that puzzles me. Below, you find a snippet from the code for
Tcl_ProcObjCmd() (extracted from tclProc.c).

It shows that a command is created by first using the string-based
interface, and next by using the Tcl_Obj interface (while passing the
same parameters).

What's the reason that both these interfaces being used?

Thanks in advance for any clarification,

Erik Leunissen
==============

Snippet from tclProc.c:

     Tcl_CreateCommand(interp, Tcl_DStringValue(&ds), TclProcInterpProc,
            (ClientData) procPtr, TclProcDeleteProc);
     cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&ds),
            TclObjInterpProc, (ClientData) procPtr, TclProcDeleteProc);

--

e.          hccnet.   | respecting a character's position in a line.



Tue, 09 Dec 2008 23:32:40 GMT  
 Tcl_ProcObjCmd() workings

Quote:

> What's the reason that both these interfaces being used?
> Snippet from tclProc.c:

>      Tcl_CreateCommand(interp, Tcl_DStringValue(&ds), TclProcInterpProc,
>        (ClientData) procPtr, TclProcDeleteProc);
>      cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&ds),
>        TclObjInterpProc, (ClientData) procPtr, TclProcDeleteProc);

This is obsolete support for the internal routine TclGetInterpProc()
that some extensions have made use of via a #include "tclInt.h".
This was an unsupported way for extensions to create commands that
Tcl would treat as procs without actually calling through Tcl's
[proc] command.  Known callers include obsolete versions of XOTcl.

This is gone from Tcl 8.5.  To use Tcl 8.5, extensions must abandon
TclGetInterpProc() and at the very least migrate to TclGetObjInterpProc().
Better still would be to get out of the "using internals" business
altogether.

See ChangeLog for 2004-08-24.

--
| Don Porter          Mathematical and Computational Sciences Division |

| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



Wed, 10 Dec 2008 00:16:05 GMT  
 Tcl_ProcObjCmd() workings

Quote:

> ... (while passing the same parameters).

     ... except that the 3rd parameter is different.

Nevertheless, my question holds.

--

e.          hccnet.   | respecting a character's position in a line.



Wed, 10 Dec 2008 01:09:04 GMT  
 Tcl_ProcObjCmd() workings
OK, understood.

Thanks,

Erik
--

e.          hccnet.   | respecting a character's position in a line.



Wed, 10 Dec 2008 01:11:31 GMT  
 Tcl_ProcObjCmd() workings

Quote:

> Nevertheless, my question holds.

Not anymore. Has been clarified.

Erik
--

e.          hccnet.   | respecting a character's position in a line.



Wed, 10 Dec 2008 01:12:24 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Tcl_ProcObjCmd call in tcl8.0.3

2. Working app stops working on new hardware

3. Working directory bug

4. My GEM/S app is working!

5. Working with SafeArray's

6. Tooltip not working for all columns in a MultipleSelectionListView

7. APL Working Group meeting in Helsinki

8. how to change working directory?

9. The Computer Museum searching for a working IBM 5100 running APL

10. #ifTrue: within a loop not working

11. Working set size

12. working directory

 

 
Powered by phpBB® Forum Software