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

Add config to specify encoding for Macro Strings #416

Open
mannprerak2 opened this issue Sep 22, 2020 · 0 comments
Open

Add config to specify encoding for Macro Strings #416

mannprerak2 opened this issue Sep 22, 2020 · 0 comments
Labels
package:ffigen type-enhancement A request for a change that isn't a bug

Comments

@mannprerak2
Copy link
Contributor

Macro Strings are considered as Utf8 by default, but we have no way to know the encoding used.
E.g the Linux POSIX API uses Extended ASCII in their macro strings.
We should add a config to let the user specify the encoding to use.

Perhaps something like this -

macros:
  ...
  encoding:
    - 'TXIP_.*': ascii # options 

We should support these options at very least - ascii, utf8(default).

Another config option could be raw which generates a Uint8List instead of a String.

@mannprerak2 mannprerak2 added the type-enhancement A request for a change that isn't a bug label Sep 23, 2020
@liamappelbe liamappelbe transferred this issue from dart-archive/ffigen Nov 15, 2023
parlough pushed a commit to parlough/native that referenced this issue Apr 8, 2024
* Add example

* Skip methods that have incomplete types

Also change how method return types are parsed

* Update bindings

* Fix overly generic method return types

* Fix tests

* Bit field test

* Fix the bug

* Fix warning wording

* Update bindings

* Remove the need for a dylib

* Update README.md

* Update examples readme

* Nits

* Add test

* Fix analysis error

* Fix more analysis errors

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ffigen type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants