You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across this when I was trying to decode a length-prefixed list of structures. I was trying to use a pattern like "l/(CCCl/a)". For some of my input data the list has length zero, so the input string is effectively equivalent to (cl-pack:pack "l" 0). I.e., ultimately I would like for this to work: (cl-pack:unpack "l/a" (cl-pack:pack "l" 0)) (e.g. return nil). At the moment I get a type error: The value NIL is not of the expected type NUMBER. (Running on Clozure CL on a Mac.)
Looking through the code it looked like the "a0" issue is likely the cause of "l/a" with a zero length giving an error.
This is not critical for me...I already coded a work-around. Simply a nice-to-have. (If I have some spare time I will see if I can come up with a patch myself. In the mean time it seemed worth reporting.)
Thanks!
The text was updated successfully, but these errors were encountered:
I'm getting:
I think ideally it should be:
I came across this when I was trying to decode a length-prefixed list of structures. I was trying to use a pattern like
"l/(CCCl/a)"
. For some of my input data the list has length zero, so the input string is effectively equivalent to(cl-pack:pack "l" 0)
. I.e., ultimately I would like for this to work:(cl-pack:unpack "l/a" (cl-pack:pack "l" 0))
(e.g. returnnil
). At the moment I get a type error:The value NIL is not of the expected type NUMBER.
(Running on Clozure CL on a Mac.)Looking through the code it looked like the
"a0"
issue is likely the cause of"l/a"
with a zero length giving an error.This is not critical for me...I already coded a work-around. Simply a nice-to-have. (If I have some spare time I will see if I can come up with a patch myself. In the mean time it seemed worth reporting.)
Thanks!
The text was updated successfully, but these errors were encountered: