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 char-width #1583

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Port char-width #1583

wants to merge 6 commits into from

Conversation

A6GibKm
Copy link

@A6GibKm A6GibKm commented Aug 24, 2020

Closes #1151.

The code works but to run I have to manually remove char-width from bindings.rs to avoid

error[E0428]: the name `char_width` is defined multiple times
     --> src/../generated/bindings.rs:28333:5
      |
28333 |     pub fn char_width(arg1: ::libc::c_int, arg2: *mut Lisp_Char_Table) -> isize;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `char_width` redefined here
      | 
     ::: src/remacs_sys.rs:92:5
      |
92    |     pub fn char_width (c: libc::c_int, dp: *mut Lisp_Char_Table) -> ptrdiff_t;
      |     -------------------------------------------------------------------------- previous definition of the value `char_width` here
      |
      = note: `char_width` must be defined only once in the value namespace of this module

I could use the definition in the bindings but I am not sure on what is the difference between ptrdiff_t and isize and if the use of c_int is fine.

rust_src/src/character.rs Outdated Show resolved Hide resolved
rust_src/src/remacs_sys.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@db48x db48x left a comment

Choose a reason for hiding this comment

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

This is good work, but it can be improved slightly

rust_src/src/lisp.rs Outdated Show resolved Hide resolved
rust_src/src/character.rs Outdated Show resolved Hide resolved
@A6GibKm
Copy link
Author

A6GibKm commented Aug 24, 2020

I am currently running make check. Will post when ready.

Copy link
Collaborator

@db48x db48x left a comment

Choose a reason for hiding this comment

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

Now it's perfect!

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.

Port char-width
2 participants