Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input-rest broken when input is "base-string" #3

Closed
jasom opened this issue Feb 14, 2013 · 1 comment
Closed

input-rest broken when input is "base-string" #3

jasom opened this issue Feb 14, 2013 · 1 comment

Comments

@jasom
Copy link

jasom commented Feb 14, 2013

This is an issue on ECL which makes strings base-string unless they contain non base-chars; for example (type-of "") => (SIMPLE-ARRAY BASE-CHAR (0))

The fix is fairly easy; you can either specialize input-rest for base-string, or add this to the beginning of input-rest for cl:string:

(when (not (equal (array-element-type input)
              (upgraded-array-element-type 'character)))
      (setf input
        (make-array (length input) :element-type 'character
            :initial-contents input)))
@jasom
Copy link
Author

jasom commented Feb 15, 2013

Created a pull request for this one, so closing

@jasom jasom closed this as completed Feb 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant