Re: don't get a correct memory address at a getter Method
Lemmih <[email protected]> Sat, 28 Aug 2010 00:06:00 +0200
| Newsgroups | gmane.comp.lang.haskell.ffi |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 27, 2010 at 11:12 PM, Nick Rudnick <[email protected]> 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: > =C2=A0 =C2=A0B* getB(){ B* ptr=3D &b; cerr << "C: " << << endl; return pt= r; } > private: > =C2=A0 =C2=A0B b; > } > ---------------------- C wrapper > B* A_getB(A* a){ a->getB(); } B* A_getB(A* a){ return a->getB(); } ? --=20 Cheers, =C2=A0 Lemmih