From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-10-09 15:47:27
A couple of minor comments.
File : subclass.cpp
the second for loop, has is_prefex(..., name + 2) done for each iteration
of the loop, this should be done once outside the loop after the test for
"!is_special_name(name)" While a good compiler should move this code, why
not just do it since that's what you mean anyway.
same comment for enable_named_method
I may be confused here but it looks like there is a problem in
Instance::getattr, where it is declared to return a PyObject *, yet can
return a new BoundFunction(); if BoundFunction returns a Ptr and you call
new on it, is it correctly converted to a PyObject *?, wouldn't it be better
return BoundFunction(blah blah).release(); ?
I'm not a big user of auto_ptr<> yet so there may be an idiom I'm missing
perhaps a comment in the code would clear this up for future maintainers.
Namespaces: The one used is "py" and "py::detail" should these become
"boost" and "boost::detail::py" ? And the code within "detail" moved to a
If and when py_c++ becomes part of the standard, won't we have a problem
with the class names "String" and "Tuple" (I'm assuming that Jaakko Jarvi's
Tuple will also make the grade.) Also on general principles I object to
naming a class "Object" How about "PyPtrObject" that's what this one is.
(also "Dict" -> "PyPtrDictionary" ?)
Otherwise a fine job.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk