Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[incr TCL] extending C?

1 view
Skip to first unread message

Andrew Ginter

unread,
Jun 27, 1995, 3:00:00 AM6/27/95
to
Is there a straightforward way to implement an [incr TCL] class in C? Or
do I have to dig through the [incr TCL] source code to do the job? ... and
repeat the effort with every new release of [incr TCL] to see that the
internal data structures haven't changed ...

I need to write an [incr TCL] class in C for performance reasons, but would
like the end result to be extensible using [incr TCL] inheritance. I want to
do all the brute-forcish stuff in C and give my users control over the
intelligent stuff.

Andrew Ginter and...@calgary.hp.com 403-299-4755


Alan Commike

unread,
Jun 29, 1995, 3:00:00 AM6/29/95
to
Andrew Ginter <and...@calgary.hp.com> writes:

>Andrew Ginter and...@calgary.hp.com 403-299-4755

It's not easy, but it's doable. Most of the support is in the guts of itcl,
but there aren't any readily available public functions. I did this a
few weeks ago. You need to make some of the static functions public.
I needed to split up a few of the functions into smaller pieces to get my
classes inserted into the class creation process at the correct time.
The code is pretty well written. It only took a few hours to get my basic
classes up and running.

I've meant to write to Michael about creating a public interface to the
class creation mechanisms, but I've moved onto other things and haven't
gotten to it....

As I was munging through the code I came accross this comment, I got
a real kick out of it. Michael, if your listening, I have the same
feelings about itcl!!

/*
* ========================================================================
* VARIABLE-HANDLING PROCEDURES
* ========================================================================
* The following procedures are copied directly from tclVar.c in the
* standard TCL distribution, and must be updated whenever TCL is
* updated. These procedures must be coped here since they are static
* (private) in the original distribution and cannot be accessed in
* any other way. It seems to me that a clean interface to low-level
* Tcl routines would be a useful thing.
* ========================================================================
*/

...alan


-------------------------------------------------------------------------------
Alan Commike __o Landmark Graphics, Houston Tx.
com...@lgc.com _'\<,_ (713) 560 - 1249
________________________( )/_( )____________________________________________


0 new messages