Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cstruct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def parse_struct(st):
# remove the comments
st = st.replace("*/","*/\n")
st = " ".join(re.split("/\*.*\*/",st))
st = "\n".join([s.split("//")[0] for s in st.split("\n")])
st.replace("\n", " ")
for line_s in st.split(";"):
line_s = line_s.strip()
Expand Down
2 changes: 1 addition & 1 deletion cstruct/tests/test_cstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Partition(cstruct.CStruct):
unsigned char partition_type;
struct Position end;
unsigned int start_sect; /* starting sector counting from 0 */
unsigned int sectors; /* nr of sectors in partition */
unsigned int sectors; // nr of sectors in partition
"""


Expand Down