2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-30 20:12:37 +00:00

Begin transition away from handle<>

[SVN r14602]
This commit is contained in:
Dave Abrahams
2002-07-25 16:29:30 +00:00
parent 30ef9c6418
commit ddb1236f2f
9 changed files with 77 additions and 74 deletions

View File

@@ -296,15 +296,15 @@ namespace objects
extern DL_IMPORT(PyTypeObject) PyProperty_Type;
}
void class_base::add_property(char const* name, handle<> const& fget)
void class_base::add_property(char const* name, object const& fget)
{
handle<> property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "O", fget.get()));
handle<> property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "O", fget.ptr()));
setattr(name, property);
}
void class_base::add_property(char const* name, handle<> const& fget, handle<> const& fset)
void class_base::add_property(char const* name, object const& fget, object const& fset)
{
handle<> property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "OO", fget.get(), fset.get()));
handle<> property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "OO", fget.ptr(), fset.ptr()));
setattr(name, property);
}