Skip to content

Non-typedef struct in return position generates incorrect glue code #410

Description

@keynmol

https://sn-bindgen-web.indoorvivants.com/binding/082216bf-1ffa-4b41-b77a-1b8976177152

struct person {
  int x;
};

struct person myfunc(struct person bla);

generated glue:

// This file was generated using sn-bindgen 0.4.4: https://sn-bindgen.indoorvivants.com/

#include <string.h>

void __sn_wrap_tests_myfunc(struct person *bla, person *____return) {
  person ____ret = myfunc(*bla);
  memcpy(____return, &____ret, sizeof(person));
}

without struct tag on the ____ret value, this won't compile.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions