Skip to content

Codegen does not apply namespace for pointer of arrays #64

@termi-official

Description

@termi-official

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions