Deprecate handle::operator== in favor of object_api::is

This commit is contained in:
Dean Moldovan
2017-02-08 01:01:56 +01:00
parent 30d43c4992
commit 36f0a15a49
4 changed files with 12 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ test_initializer eval([](py::module &m) {
);
auto x = local["x"].cast<int>();
return result == py::none() && x == 42;
return result.is_none() && x == 42;
});
m.def("test_eval", [global]() {
@@ -55,7 +55,7 @@ test_initializer eval([](py::module &m) {
auto result = py::eval<py::eval_single_statement>("x = call_test()", py::dict(), local);
auto x = local["x"].cast<int>();
return result == py::none() && x == 42;
return result.is_none() && x == 42;
});
m.def("test_eval_file", [global](py::str filename) {
@@ -66,7 +66,7 @@ test_initializer eval([](py::module &m) {
local["call_test2"] = py::cpp_function([&](int value) { val_out = value; });
auto result = py::eval_file(filename, global, local);
return val_out == 43 && result == py::none();
return val_out == 43 && result.is_none();
});
m.def("test_eval_failure", []() {