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

Codegen does not apply namespace for pointer of arrays #64

Open
termi-official opened this issue Nov 15, 2024 · 0 comments
Open

Codegen does not apply namespace for pointer of arrays #64

termi-official opened this issue Nov 15, 2024 · 0 comments

Comments

@termi-official
Copy link
Contributor

MWE

source file

namespace MySpace {
  struct C {};

  void f(C *)  { }
  void g(C *[]) { }
  void h(C **) { }
}

relevant codegen

// [...]
void add_methods() const{
    auto& t = module_;

    DEBUG_MSG("Adding wrapper for void MySpace::f(MySpace::C *) (" __HERE__ ")");
    // signature to use in the veto list: void MySpace::f(MySpace::C *)
    // defined in ./A.h:20:8
    t.method("MySpace!f", static_cast<void (*)(MySpace::C *) >(&MySpace::f));

    DEBUG_MSG("Adding wrapper for void MySpace::g(C *[]) (" __HERE__ ")");
    // signature to use in the veto list: void MySpace::g(C *[])
    // defined in ./A.h:21:8
    t.method("MySpace!g", static_cast<void (*)(C *[]) >(&MySpace::g));

    DEBUG_MSG("Adding wrapper for void MySpace::h(MySpace::C **) (" __HERE__ ")");
    // signature to use in the veto list: void MySpace::h(MySpace::C **)
    // defined in ./A.h:22:8
    t.method("MySpace!h", static_cast<void (*)(MySpace::C **) >(&MySpace::h));
  }

// [...]

Here the function g is not correctly wrapped, as the namespace for C is omitted.

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

1 participant