Boost::Python - Expose a function that returns void*
===

I am trying to expose a class methods that have the return type / parameter type `Directory*` which is typedef'ed as `void`, i.e. in the header file:

    typedef void Directory;
    [...]
    class Catalog {
        public: 
        virtual Directory* openDir(const std::string& path) = 0;
        virtual void closeDir(Directory* dir) = 0;
        [...]
    }

When exposing this with

    .def("closeDir", &Catalog::closeDir)

I get the error `no matching function for call to registry_lookup(const volatile void (*)())`. Obviously, Boost::Python is not able to expose functions with `void*` parameters or return values like this. How is it done correctly?

And how is it done for `void*` return types? The following gives me also an error:

    .def("openDir", static_cast< void*(Catalog::*)(const std::string&) >
                                                                (&Catalog::openDir))

(Even if I try to add return value policies.)