Dereference a pointer in Cxx


Im trying to write an interface to a C++ library using Cxx. I’m running into a problem with pointers. Specifically, I can create a new object like so:

	myObj = @cxxnew Object()

However, I would now like to call a member function of a different class, that takes a parameter of type Object:

	@cxx foo->setObj(myObj)

This does not work, apparently because myObj is in fact a pointer to an Object:

  /Cxx.cpp:1:1: error: reference to type 'const Object' could not bind to an lvalue of type 'Object *'

So it looks like I need to dereference myObj. At least, that’s what I would do if I were writing C++ and not Julia. I cannot for the life of me find a combination of unsafe_load() or unsafe_pointer_to_objref() or any other magic incantations from the Julai C interface or Cxx library to make this work. Any help would be appreciated.