We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 methods in Fiddle::CParser such as parse_struct_signature are useful on their own, outside of a class instance.
Fiddle::CParser
parse_struct_signature
Would it make sense to be able to call these as module methods, in addition to the existing instance method interface?
i.e.
require 'fiddle/cparser' Fiddle::CParser.parse_struct_signature(...)
The text was updated successfully, but these errors were encountered:
Could you share your use case? We may introduce a new more convenient API instead of exporting parse_struct_signature with the current specification.
Sorry, something went wrong.
I was trying to create a representation of a C structure without having to include Fiddle::CParser or some other module into my namespace.
include Fiddle::CParser
OK. Then, does the following code satisfy your use case with the current API?
require "fiddle/import" cparser_class = Class.new do include Fiddle::CParser end cparser = cparser_class.new pp cparser.parse_struct_signature(["int i", "char c"]) # => [[4, 2], ["i", "c"]]
No branches or pull requests
The methods in
Fiddle::CParser
such asparse_struct_signature
are useful on their own, outside of a class instance.Would it make sense to be able to call these as module methods, in addition to the existing instance method interface?
i.e.
The text was updated successfully, but these errors were encountered: