27 Nov 09:10
Tcl cprint for C structs
From: Gabor Greif <gabor <at> mac.com>
Subject: Tcl cprint for C structs
Newsgroups: gmane.comp.programming.swig
Date: 2008-11-27 08:12:36 GMT
Subject: Tcl cprint for C structs
Newsgroups: gmane.comp.programming.swig
Date: 2008-11-27 08:12:36 GMT
Hi all,
I had the need to print all members of a C struct in one
go.
So I have implemented, a "cprint" method for structure
commands in the TCL backend.
Example:
struct whum {
int foo;
char* bar;
};
Generates this TCL functionality:
whum it
it configure -foo 42 -bar hey
puts [it cprint]
---> "-foo 42 -bar hey"
Anyone interested in a patch? Is it a good idea
to put something like this into the general distro?
Cheers,
Gabor
(Continue reading)
RSS Feed