This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, 2007-07-10 at 13:56 -0700, Mike Mason wrote:Frank Ch. Eigler wrote:Eugene Teo <eteo@redhat.com> writes:See the socket.stp tapset for examples of Frank's suggestion.
[...] Kindly review please. I will commit the changes if there are no objection.Please try to build this in terms of ordinary script code. It can just export two arrays for name<->number mappings (or perhaps two functions to provide read-only access to the arrays). It is not obvious to me that there is any advantage to the embedded-C code.
Mike
- FChE
Yes, but the existence of (big) mirrored associative arrays such as _prot_num2str[] and _prot_str2num[] suggests that there ought to be a simple way to generate one from the other. And there is... foreach (num in _prot_num2str) _prot_str2num[_prot_num2str[num]] = num
Thanks, Mike
Jim
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |