From a3e99164009a985d2457c0abd0ce13ac9cc41ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Tue, 14 Jul 2020 13:21:30 +0200 Subject: [PATCH] Fix order of overloads for VersionInfo constructors. --- src/runner/pythonrunner.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 5dabc7b..011fc04 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -177,10 +177,12 @@ BOOST_PYTHON_MODULE(mobase) bpy::class_("VersionInfo") .def(bpy::init( (bpy::arg("value"), bpy::arg("scheme") = VersionInfo::SCHEME_DISCOVER))) - .def(bpy::init( - (bpy::arg("major"), "minor", "subminor", bpy::arg("release_type") = VersionInfo::RELEASE_FINAL))) + // Note: Order of the two init<> below is important because ReleaseType is a simple enum with an + // implicit int conversion. .def(bpy::init( (bpy::arg("major"), "minor", "subminor", "subsubminor", bpy::arg("release_type") = VersionInfo::RELEASE_FINAL))) + .def(bpy::init( + (bpy::arg("major"), "minor", "subminor", bpy::arg("release_type") = VersionInfo::RELEASE_FINAL))) .def("clear", &VersionInfo::clear) .def("parse", &VersionInfo::parse, (bpy::arg("value"), bpy::arg("scheme") = VersionInfo::SCHEME_DISCOVER, bpy::arg("is_manual") = false))