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

Port some math functions #311

Merged
merged 3 commits into from
Sep 19, 2017
Merged

Conversation

shanavas786
Copy link
Collaborator

No description provided.

/// Return the bitwise complement of NUMBER. NUMBER must be an integer.
#[lisp_fn]
fn lognot(number: LispObject) -> LispObject {
LispObject::from_fixnum(!number.as_fixnum_or_error())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be from_fixnum_truncated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

travis failure was due to format errors,
why do you think from_fixnum_truncated is needed here ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, I was thinking about unsigned integers.

Copy link
Collaborator

@Wilfred Wilfred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice to see arithop gone from the C side :)

@birkenfeld birkenfeld merged commit 5d7c122 into remacs:master Sep 19, 2017
@shanavas786 shanavas786 deleted the port-arith-fns branch October 24, 2017 13:30
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

Successfully merging this pull request may close these issues.

3 participants