Skip to content

Commit

Permalink
ignore ifdefs in source
Browse files Browse the repository at this point in the history
pypanda
  • Loading branch information
lacraig2 committed Oct 22, 2024
1 parent bf71bca commit 7990a2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions panda/python/core/create_panda_datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def copy_ppp_header(filename):
subcontents = trim_pypanda(contents)
for line in subcontents.split("\n"):
# now add void ppp_add_cb_{cb_name}({cb_name}_t);
forbidden = ["#ifndef", "#endif"]
if any(i in line for i in forbidden):
continue
m = reg.match(line)
if m:
ret_type = m.groups(1)[0]
Expand Down Expand Up @@ -229,6 +232,7 @@ def expand_ppp_def(line):
ffi.cdef("typedef int target_pid_t;")

ffi.cdef("typedef uint"+str(bits)+"_t target_ulong;")
ffi.cdef("typedef uint"+str(bits)+"_t target_ptr_t;")
ffi.cdef("typedef int"+str(bits)+"_t target_long;")

# PPP Headers
Expand Down

0 comments on commit 7990a2d

Please sign in to comment.