mirror of
https://github.com/boostorg/python.git
synced 2026-01-21 17:12:22 +00:00
TypeObjectBase: always try sharing of method table automatically (thus, share_method_tables() is no longer needed and was removed)
[SVN r8267]
This commit is contained in:
@@ -94,7 +94,6 @@ StringMapPythonClass::StringMapPythonClass()
|
||||
def(&get_item, "__getitem__");
|
||||
def(&set_item, "__setitem__");
|
||||
def(&del_item, "__delitem__");
|
||||
share_method_tables();
|
||||
}
|
||||
|
||||
int get_first(const IntPair& p)
|
||||
@@ -123,7 +122,6 @@ IntPairPythonClass::IntPairPythonClass()
|
||||
def(&get_first, "__getattr__first__");
|
||||
def(&set_first, "__setattr__first__");
|
||||
def(&del_first, "__delattr__first__");
|
||||
share_method_tables();
|
||||
}
|
||||
|
||||
void IntPairPythonClass::setattr(IntPair& x, const std::string& name, int value)
|
||||
@@ -817,7 +815,7 @@ namespace extclass_demo {
|
||||
throw py::ErrorAlreadySet();
|
||||
}
|
||||
|
||||
const int number = py::from_python(state[0].get(), py::Type<int>());
|
||||
const int number = PY_CONVERSION::from_python(state[0].get(), py::Type<int>());
|
||||
if (number != 42)
|
||||
w.set_secret_number(number);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user