diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-03-19 22:59:57 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-03-19 22:59:57 +0100 |
commit | c15b608343c5a0de8558b31650ed001177fb3892 (patch) | |
tree | 0857fb3d33bea57b30bd2d3833af8c798cf837d4 /parse.cxx | |
parent | d0cd971e70eba3781a95862223d1f7d45e2f5135 (diff) | |
download | systemtap-steved-c15b608343c5a0de8558b31650ed001177fb3892.tar.gz systemtap-steved-c15b608343c5a0de8558b31650ed001177fb3892.tar.xz systemtap-steved-c15b608343c5a0de8558b31650ed001177fb3892.zip |
Allow @cast on "struct " and "union " (by ignoring them).
* parse.cxx (parser::parse_symbol): Strip off "struct " or "union "
from cop->type.
Diffstat (limited to 'parse.cxx')
-rw-r--r-- | parse.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2341,6 +2341,12 @@ parser::parse_symbol () cop->operand = parse_expression (); expect_op(","); expect_unknown(tok_string, cop->type); + // types never start with "struct<space>" or "union<space>", + // so gobble it up. + if (cop->type.compare(0, 7, "struct ") == 0) + cop->type = cop->type.substr(7); + if (cop->type.compare(0, 6, "union ") == 0) + cop->type = cop->type.substr(6); if (peek_op (",")) { next(); |