2
0
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:
Ullrich Köthe
2000-11-20 11:16:18 +00:00
parent 6b3af7fe7b
commit 987df9cab0
5 changed files with 59 additions and 91 deletions

View File

@@ -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);
}