-
Notifications
You must be signed in to change notification settings - Fork 7
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
The function pack need to initail the elements of teh variable result to 0 #6
Open
Yehouda
wants to merge
71
commits into
gigamonkey:master
Choose a base branch
from
mgi:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a :reader, a :writer and a :size (or any combination of them). For example: ;; Just a reader and a size for this unsigned integer (define-binary-type unsigned-integer (bytes bits-per-byte) (:reader (in) (loop with value = 0 for low-bit downfrom (* bits-per-byte (1- bytes)) to 0 by bits-per-byte do (setf (ldb (byte bits-per-byte low-bit) value) (read-byte in)) finally (return value))) (:size () bytes)) A not present :reader, :writer or :size will error out at call time.
one can obtain the byte size of a binary class object.
…rs (intel is my master).
…rs (intel is my master).
size of a read-byte. start to optimize a bit.
…ll be of interest on vectors
and now io stream should be of type '(unsigned-byte 8) for most data-type.
[read|write]-value-at interface instead.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[edit: that ended in the wrong place apparently. It was supposed to be about mgi/binary-io ]
Inside the function pack the variable result is currently bound to (make-array m), which create a simple-vector with NILs. then the call to ldb gets NIL as third argument and errors. That happens when running the tests.
It needs to be initialized with Zeroes, by being bound to (make-array m :initial-element 0).
I am not actually pulling the code, I am just raising an issue. I do it in a pull request because I didn't find the issues for this project.