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

Switch from rubygem-ffi to fiddle #111

Merged
merged 1 commit into from
Jan 7, 2022
Merged

Conversation

skazi0
Copy link
Contributor

@skazi0 skazi0 commented Jan 7, 2022

Fiddle is an FFI implementation which is included in standard Ruby.
Switching from FFI gem to Fiddle removes one dependency without loosing
any functionality.

Fiddle is an FFI implementation which is included in standard Ruby.
Switching from FFI gem to Fiddle removes one dependency without loosing
any functionality.
@skazi0 skazi0 requested a review from djoreilly January 7, 2022 08:56
Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

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

Avoiding extra dependency is good! 👍
Thanks!

dlload 'libsuseconnect.so'
typealias 'string', 'char*'

#callback type: void log_line(int, string)
Copy link
Member

Choose a reason for hiding this comment

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

If it is not needed then I'd remove it completely, avoid dead code...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not old code, just a plain comment. Fiddle doesn't support callback types so everything is passed as void pointer. Without this, future us would need to dig through the code to find out what is the expected function signature.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I overlooked that, I thought it is part of the previous ffi code...

Copy link
Collaborator

@djoreilly djoreilly left a comment

Choose a reason for hiding this comment

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

lgtm

@skazi0 skazi0 merged commit bbb5544 into SUSE:main Jan 7, 2022
@skazi0 skazi0 deleted the fiddle-not-ffi branch January 7, 2022 11:37
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.

None yet

3 participants