Changeset b3105ff6 in mainline for tools/xstruct.py
- Timestamp:
- 2008-08-09T20:16:47Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 838e14e2
- Parents:
- 8c25a4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/xstruct.py
r8c25a4a rb3105ff6 43 43 "network:": lambda: "!" 44 44 }[tokens[0]]() 45 45 46 46 # Member tags 47 47 48 comment = False 48 49 for token in tokens[1:]: 49 if (token[0:5] == "char["): 50 if (comment): 51 if (token == "*/"): 52 comment = False 53 continue 54 55 if (token == "/*"): 56 comment = True 57 elif (token[0:5] == "char["): 50 58 size = token[5:].split("]")[0] 51 59 struct += ("%d" % int(size)) + "s" … … 67 75 def little_string(string): 68 76 return struct.pack("<" + ("%d" % len(string)) + "s", string) 77 78 def little_padding(length): 79 return struct.pack("<" + ("%d" % length) + "x")
Note:
See TracChangeset
for help on using the changeset viewer.