mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Fix name of wrapped arguments.
This commit is contained in:
@@ -83,9 +83,9 @@ namespace mo2::python {
|
||||
MO2_PYBIND11_SHARED_CPP_HOLDER(MOBase::IPluginRequirement)
|
||||
MO2_PYBIND11_SHARED_CPP_HOLDER(MOBase::ISaveGame)
|
||||
|
||||
MO2_PYBIND11_WRAP_ARGUMENT_CASTER(mo2::python::FileWrapper, QFileInfo,
|
||||
std::filesystem::path, QString);
|
||||
MO2_PYBIND11_WRAP_ARGUMENT_CASTER(mo2::python::DirectoryWrapper, QDir,
|
||||
MO2_PYBIND11_WRAP_ARGUMENT_CASTER(mo2::python::FileWrapper, "FileWrapper", QFileInfo,
|
||||
std::filesystem::path, QString);
|
||||
MO2_PYBIND11_WRAP_ARGUMENT_CASTER(mo2::python::DirectoryWrapper, "DirectoryWrapper",
|
||||
QDir, std::filesystem::path, QString);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -126,11 +126,11 @@ namespace mo2::python {
|
||||
|
||||
} // namespace mo2::python
|
||||
|
||||
#define MO2_PYBIND11_WRAP_ARGUMENT_CASTER(Type, ...) \
|
||||
#define MO2_PYBIND11_WRAP_ARGUMENT_CASTER(Type, Name, ...) \
|
||||
namespace pybind11::detail { \
|
||||
template <> \
|
||||
struct type_caster<Type> { \
|
||||
PYBIND11_TYPE_CASTER(Type, const_name(#Type)); \
|
||||
PYBIND11_TYPE_CASTER(Type, const_name(Name)); \
|
||||
bool load(handle src, bool convert) \
|
||||
{ \
|
||||
return mo2::python::detail::load_wrapped_argument_helper< \
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
operator std::string() const { return value; }
|
||||
};
|
||||
|
||||
MO2_PYBIND11_WRAP_ARGUMENT_CASTER(Wrapper, int, std::string);
|
||||
MO2_PYBIND11_WRAP_ARGUMENT_CASTER(Wrapper, "Wrapper", int, std::string);
|
||||
|
||||
template <std::size_t... Is, class Fn>
|
||||
auto wrap(Fn&& fn)
|
||||
|
||||
Reference in New Issue
Block a user