Skip to content

[QUESTION] Function with pointer to pointer arg  #2812

Closed
@kumaraditya303

Description

@kumaraditya303

I am writing a Trampoline class for leveldb Env Class https://github.com/google/leveldb/blob/master/include/leveldb/env.h

class PyEnv : Env
{

public:
    using Env::Env;
    Status NewSequentialFile(const std::string &fname,
                             SequentialFile **result) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,            /* Return type */
            Env,               /* Parent class */
            NewSequentialFile, /* Name of function in C++ (must match Python name) */
            fname,
            result /* Argument(s) */
        );
    }
    Status NewRandomAccessFile(const std::string &fname,
                               RandomAccessFile **result) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,              /* Return type */
            Env,                 /* Parent class */
            NewRandomAccessFile, /* Name of function in C++ (must match Python name) */
            fname,
            result /* Argument(s) */
        );
    }
    Status NewWritableFile(const std::string &fname,
                           WritableFile **result) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,          /* Return type */
            Env,             /* Parent class */
            NewWritableFile, /* Name of function in C++ (must match Python name) */
            fname,
            result /* Argument(s) */
        );
    }
    Status NewAppendableFile(const std::string &fname,
                             WritableFile **result) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,            /* Return type */
            Env,               /* Parent class */
            NewAppendableFile, /* Name of function in C++ (must match Python name) */
            fname,
            result /* Argument(s) */
        );
    }
    bool FileExists(const std::string &fname) override
    {
        PYBIND11_OVERRIDE_PURE(
            bool,       /* Return type */
            Env,        /* Parent class */
            FileExists, /* Name of function in C++ (must match Python name) */
            fname);
    }
    Status GetChildren(const std::string &dir,
                       std::vector<std::string> *result) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,      /* Return type */
            Env,         /* Parent class */
            GetChildren, /* Name of function in C++ (must match Python name) */
            dir,
            result);
    }
    Status RemoveFile(const std::string &fname) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,     /* Return type */
            Env,        /* Parent class */
            RemoveFile, /* Name of function in C++ (must match Python name) */
            fname);
    }
    Status DeleteFile(const std::string &fname) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,     /* Return type */
            Env,        /* Parent class */
            DeleteFile, /* Name of function in C++ (must match Python name) */
            fname);
    }
    Status CreateDir(const std::string &dirname) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,    /* Return type */
            Env,       /* Parent class */
            CreateDir, /* Name of function in C++ (must match Python name) */
            dirname);
    }
    Status RemoveDir(const std::string &dirname) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,    /* Return type */
            Env,       /* Parent class */
            RemoveDir, /* Name of function in C++ (must match Python name) */
            dirname);
    }
    Status DeleteDir(const std::string &dirname) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,    /* Return type */
            Env,       /* Parent class */
            DeleteDir, /* Name of function in C++ (must match Python name) */
            dirname);
    }
    Status GetFileSize(const std::string &fname, uint64_t *file_size) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,      /* Return type */
            Env,         /* Parent class */
            GetFileSize, /* Name of function in C++ (must match Python name) */
            fname,
            file_size);
    }
    Status RenameFile(const std::string &src,
                      const std::string &target) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,     /* Return type */
            Env,        /* Parent class */
            RenameFile, /* Name of function in C++ (must match Python name) */
            src,
            target);
    }
    Status LockFile(const std::string &fname, FileLock **lock) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,   /* Return type */
            Env,      /* Parent class */
            LockFile, /* Name of function in C++ (must match Python name) */
            fname,
            lock);
    }
    Status UnlockFile(FileLock *lock) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,     /* Return type */
            Env,        /* Parent class */
            UnlockFile, /* Name of function in C++ (must match Python name) */
            lock);
    }
    void Schedule(void (*function)(void *arg), void *arg) override
    {
        PYBIND11_OVERRIDE_PURE(
            void,     /* Return type */
            Env,      /* Parent class */
            Schedule, /* Name of function in C++ (must match Python name) */
            function,
            arg,
            arg);
    }
    void StartThread(void (*function)(void *arg), void *arg) override
    {
        PYBIND11_OVERRIDE_PURE(
            void,        /* Return type */
            Env,         /* Parent class */
            StartThread, /* Name of function in C++ (must match Python name) */
            function,
            arg,
            arg);
    }
    Status GetTestDirectory(std::string *path) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,           /* Return type */
            Env,              /* Parent class */
            GetTestDirectory, /* Name of function in C++ (must match Python name) */
            path);
    }
    Status NewLogger(const std::string &fname, Logger **result) override
    {
        PYBIND11_OVERRIDE_PURE(
            Status,    /* Return type */
            Env,       /* Parent class */
            NewLogger, /* Name of function in C++ (must match Python name) */
            fname, result);
    }
    uint64_t NowMicros() override
    {
        PYBIND11_OVERRIDE_PURE(
            uint64_t,     /* Return type */
            Env,          /* Parent class */
            NowMicros, ); /* Name of function in C++ (must match Python name) */
    }
    void SleepForMicroseconds(int micros) override
    {
        PYBIND11_OVERRIDE_PURE(
            void, /* Return type */
            Env,  /* Parent class */
            SleepForMicroseconds,
            micros);
    }
};

Compiler:
Copyright (C) Microsoft Corporation. All rights reserved.

16.8.3.61104
But it errors out while compiling with error:

running build_ext
building 'leveldb' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I./third_party/leveldb/include/ -I./third_party/leveldb/port/ -I./third_party/leveldb/util/ -I./third_party/leveldb/ -I./third_party/snappy/ -I./third_party/snappy/build/ -I./third_party/pybind11/include/ -IC:\Users\Kumar Aditya\AppData\Local\Programs\Python\Python39\include -IC:\Users\Kumar Aditya\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /EHsc /Tp./leveldb/leveldb.cpp /Fobuild\temp.win-amd64-3.9\Release\./leveldb/leveldb.obj -DSNAPPY -DLEVELDB_PLATFORM_WINDOWS
leveldb.cpp
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(870): warning C4180: qualifier applied to function type has no meaning; ignored
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(946): note: see reference to class template instantiation 'pybind11::detail::type_caster_base<type>' being compiled
        with
        [
            type=void (const leveldb::Slice &,void *)
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1996): note: see reference to class template instantiation 'pybind11::detail::type_caster<void (const leveldb::Slice &,void *),void>' being compiled
./third_party/pybind11/include/pybind11/pybind11.h(166): note: see reference to class template instantiation 'pybind11::detail::argument_loader<Class *,const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *)>' being compiled
        with
        [
            Class=leveldb::Cache
        ]
./third_party/pybind11/include/pybind11/pybind11.h(85): note: see reference to function template instantiation 'void pybind11::cpp_function::initialize<pybind11::cpp_function::{ctor}::<lambda_7ea5e8ab80bc2d73cc10c3d37f9940e8>,Return,Class*,const leveldb::Slice&,void*,size_t,void(__cdecl *)(const leveldb::Slice &,void *),pybind11::name,pybind11::is_method,pybind11::sibling,pybind11::return_value_policy>(Func &&,Return (__cdecl *)(Class *,const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *)),const pybind11::name &,const pybind11::is_method &,const pybind11::sibling &,const pybind11::return_value_policy &)' being compiled
        with
        [
            Return=leveldb::Cache::Handle *,
            Class=leveldb::Cache,
            Func=pybind11::cpp_function::{ctor}::<lambda_7ea5e8ab80bc2d73cc10c3d37f9940e8>
        ]
./third_party/pybind11/include/pybind11/pybind11.h(1317): note: see reference to function template instantiation 'pybind11::cpp_function::cpp_function<Return,leveldb::Cache,const leveldb::Slice&,void*,size_t,void(__cdecl *)(const leveldb::Slice &,void *),pybind11::name,pybind11::is_method,pybind11::sibling,pybind11::return_value_policy>(Return (__cdecl leveldb::Cache::* )(const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *)),const pybind11::name &,const pybind11::is_method &,const pybind11::sibling &,const pybind11::return_value_policy &)' being compiled
        with
        [
            Return=leveldb::Cache::Handle *
        ]
./leveldb/leveldb.cpp(409): note: see reference to function template instantiation 'pybind11::class_<leveldb::Cache,PyCache> &pybind11::class_<leveldb::Cache,PyCache>::def<leveldb::Cache::Handle*(__cdecl leveldb::Cache::* )(const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *)),pybind11::return_value_policy>(const char *,Func &&,const pybind11::return_value_policy &)' being compiled
        with
        [
            Func=leveldb::Cache::Handle *(__cdecl leveldb::Cache::* )(const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *))
        ]
./leveldb/leveldb.cpp(418): note: see reference to function template instantiation 'pybind11::class_<leveldb::Cache,PyCache> &pybind11::class_<leveldb::Cache,PyCache>::def<leveldb::Cache::Handle*(__cdecl leveldb::Cache::* )(const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *)),pybind11::return_value_policy>(const char *,Func &&,const pybind11::return_value_policy &)' being compiled
        with
        [
            Func=leveldb::Cache::Handle *(__cdecl leveldb::Cache::* )(const leveldb::Slice &,void *,size_t,void (__cdecl *)(const leveldb::Slice &,void *))
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(883): warning C4180: qualifier applied to function type has no meaning; ignored
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(904): warning C4180: qualifier applied to function type has no meaning; ignored
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(911): warning C4180: qualifier applied to function type has no meaning; ignored
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1836): error C2665: 'pybind11::detail::type_caster_base<type>::cast': none of the 3 overloads could convert all the argument types
        with
        [
            type=leveldb::SequentialFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(904): note: could be 'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::SequentialFile *,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::SequentialFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(876): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(leveldb::SequentialFile &&,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::SequentialFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(870): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::SequentialFile &,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::SequentialFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1838): note: while trying to match the argument list '(leveldb::SequentialFile **, pybind11::return_value_policy, nullptr)'
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2045): note: see reference to function template instantiation 'pybind11::tuple pybind11::make_tuple<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::SequentialFile**&>(const std::string &,leveldb::SequentialFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::SequentialFile**&>(const std::string &,leveldb::SequentialFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::SequentialFile**&>(const std::string &,leveldb::SequentialFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2219): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference> pybind11::detail::collect_arguments<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::SequentialFile**&,void>(const std::string &,leveldb::SequentialFile **&)' being compiled
./leveldb/leveldb.cpp(185): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::SequentialFile**&>(const std::string &,leveldb::SequentialFile **&) const' being compiled
./leveldb/leveldb.cpp(185): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::SequentialFile**&>(const std::string &,leveldb::SequentialFile **&) const' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1836): error C2665: 'pybind11::detail::type_caster_base<type>::cast': none of the 3 overloads could convert all the argument types
        with
        [
            type=leveldb::RandomAccessFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(904): note: could be 'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::RandomAccessFile *,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::RandomAccessFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(876): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(leveldb::RandomAccessFile &&,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::RandomAccessFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(870): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::RandomAccessFile &,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::RandomAccessFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1838): note: while trying to match the argument list '(leveldb::RandomAccessFile **, pybind11::return_value_policy, nullptr)'
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2045): note: see reference to function template instantiation 'pybind11::tuple pybind11::make_tuple<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::RandomAccessFile**&>(const std::string &,leveldb::RandomAccessFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::RandomAccessFile**&>(const std::string &,leveldb::RandomAccessFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::RandomAccessFile**&>(const std::string &,leveldb::RandomAccessFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2219): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference> pybind11::detail::collect_arguments<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::RandomAccessFile**&,void>(const std::string &,leveldb::RandomAccessFile **&)' being compiled
./leveldb/leveldb.cpp(196): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::RandomAccessFile**&>(const std::string &,leveldb::RandomAccessFile **&) const' being compiled
./leveldb/leveldb.cpp(196): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::RandomAccessFile**&>(const std::string &,leveldb::RandomAccessFile **&) const' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1836): error C2665: 'pybind11::detail::type_caster_base<type>::cast': none of the 3 overloads could convert all the argument types
        with
        [
            type=leveldb::WritableFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(904): note: could be 'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::WritableFile *,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::WritableFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(876): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(leveldb::WritableFile &&,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::WritableFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(870): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::WritableFile &,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::WritableFile
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1838): note: while trying to match the argument list '(leveldb::WritableFile **, pybind11::return_value_policy, nullptr)'
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2045): note: see reference to function template instantiation 'pybind11::tuple pybind11::make_tuple<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::WritableFile**&>(const std::string &,leveldb::WritableFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::WritableFile**&>(const std::string &,leveldb::WritableFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::WritableFile**&>(const std::string &,leveldb::WritableFile **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2219): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference> pybind11::detail::collect_arguments<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::WritableFile**&,void>(const std::string &,leveldb::WritableFile **&)' being compiled
./leveldb/leveldb.cpp(207): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::WritableFile**&>(const std::string &,leveldb::WritableFile **&) const' being compiled
./leveldb/leveldb.cpp(207): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::WritableFile**&>(const std::string &,leveldb::WritableFile **&) const' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1836): error C2665: 'pybind11::detail::type_caster_base<type>::cast': none of the 3 overloads could convert all the argument types
        with
        [
            type=leveldb::FileLock
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(904): note: could be 'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::FileLock *,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::FileLock
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(876): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(leveldb::FileLock &&,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::FileLock
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(870): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::FileLock &,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::FileLock
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1838): note: while trying to match the argument list '(leveldb::FileLock **, pybind11::return_value_policy, nullptr)'
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2045): note: see reference to function template instantiation 'pybind11::tuple pybind11::make_tuple<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::FileLock**&>(const std::string &,leveldb::FileLock **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::FileLock**&>(const std::string &,leveldb::FileLock **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::FileLock**&>(const std::string &,leveldb::FileLock **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2219): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference> pybind11::detail::collect_arguments<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::FileLock**&,void>(const std::string &,leveldb::FileLock **&)' being compiled
./leveldb/leveldb.cpp(305): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::FileLock**&>(const std::string &,leveldb::FileLock **&) const' being compiled
./leveldb/leveldb.cpp(305): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::FileLock**&>(const std::string &,leveldb::FileLock **&) const' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1836): error C2665: 'pybind11::detail::type_caster_base<type>::cast': none of the 3 overloads could convert all the argument types
        with
        [
            type=leveldb::Logger
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(904): note: could be 'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::Logger *,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::Logger
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(876): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(leveldb::Logger &&,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::Logger
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(870): note: or       'pybind11::handle pybind11::detail::type_caster_base<type>::cast(const leveldb::Logger &,pybind11::return_value_policy,pybind11::handle)'
        with
        [
            type=leveldb::Logger
        ]
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(1838): note: while trying to match the argument list '(leveldb::Logger **, pybind11::return_value_policy, nullptr)'
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2045): note: see reference to function template instantiation 'pybind11::tuple pybind11::make_tuple<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::Logger**&>(const std::string &,leveldb::Logger **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::Logger**&>(const std::string &,leveldb::Logger **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2199): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference>::simple_collector<const std::string&,leveldb::Logger**&>(const std::string &,leveldb::Logger **&)' being compiled
D:\python-leveldb\third_party\pybind11\include\pybind11\cast.h(2219): note: see reference to function template instantiation 'pybind11::detail::simple_collector<pybind11::return_value_policy::automatic_reference> pybind11::detail::collect_arguments<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::Logger**&,void>(const std::string &,leveldb::Logger **&)' being compiled
./leveldb/leveldb.cpp(350): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::Logger**&>(const std::string &,leveldb::Logger **&) const' being compiled
./leveldb/leveldb.cpp(350): note: see reference to function template instantiation 'pybind11::object pybind11::detail::object_api<pybind11::handle>::operator ()<pybind11::return_value_policy::automatic_reference,const std::string&,leveldb::Logger**&>(const std::string &,leveldb::Logger **&) const' being compiled

It seems it is erroring due to c++ ** args

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions