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

Futhark doesn't understand C defines that define type aliases. #29

Open
Yardanico opened this issue Apr 21, 2022 · 1 comment
Open

Futhark doesn't understand C defines that define type aliases. #29

Yardanico opened this issue Apr 21, 2022 · 1 comment

Comments

@Yardanico
Copy link
Contributor

Yardanico commented Apr 21, 2022

For example:

#define LRESULT long

Gets turned into something like:

when not declared(Lresult):
  when long is typedesc:
    type
      Lresult* = long        ## Generated based on /home/dian/Projects/nsciter/sciter-js-sdk/include/sciter-x-types.h:71:11
  else:
    const
      Lresult* = long        ## Generated based on /home/dian/Projects/nsciter/sciter-js-sdk/include/sciter-x-types.h:71:11
# somewhere else in the file
when not declared(long):
  type
    long* = distinct object
@Yardanico Yardanico changed the title Futhark doesn't understand defines that define C type aliases. Futhark doesn't understand C defines that define type aliases. Apr 21, 2022
@PMunch
Copy link
Owner

PMunch commented May 24, 2022

The problem here is actually that the right hand side should get checked if it is a C-type and turned into a c prefixed type (in this case clong).

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

No branches or pull requests

2 participants