don't get a correct memory address at a getter Method

Lemmih lemmih at gmail.com
Fri Aug 27 18:06:00 EDT 2010


On Fri, Aug 27, 2010 at 11:12 PM, Nick Rudnick
<joerg.rudnick at t-online.de> wrote:
> Hi,
>
> being new to the FFI, I hope this might have an easy solution:
>
> The following (GHC 6.12.1),
>
> ---------------------- C++ lib
> class A {
> public:
>    B* getB(){ B* ptr= &b; cerr << "C: " << << endl; return ptr; }
> private:
>    B b;
> }
> ---------------------- C wrapper
> B* A_getB(A* a){ a->getB(); }

B* A_getB(A* a){ return a->getB(); } ?

-- 
Cheers,
  Lemmih


More information about the FFI mailing list