Skip to content

Commit

Permalink
update ctypes
Browse files Browse the repository at this point in the history
  • Loading branch information
thqby committed Sep 7, 2023
1 parent 3bf8931 commit 8553ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctypes.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ class ctypes {
size := basic_types.%tp%
return { align: 0, size: size, pack: size, type: tp, name: tp, wrapper: 0 }
}
tp := ctypes.types.Get(tp, 0) ||
tp := ctypes.types.Get(t := tp, 0) ||
((tp := RegExReplace(tp, '\*$', , &n)) && n ? ctypes.ptr(tp) :
RegExMatch(tp, '^(.+)\[(\d+)\]$', &tp) && ctypes.array(tp[1], Integer(tp[2])))
}
Expand All @@ -575,6 +575,6 @@ class ctypes {
}
return { align: align, size: size, pack: pack, type: type, name: tp.name, wrapper: tp }
}
throw TypeError('unknown type')
throw TypeError('unknown type',, t ?? tp)
}
}

0 comments on commit 8553ddc

Please sign in to comment.