mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +00:00
Fixed a bug in add(), which allows non-method class attributes
[SVN r8178]
This commit is contained in:
@@ -114,9 +114,9 @@ class ClassWrapper
|
||||
// set an arbitrary attribute. Useful for non-function class data members,
|
||||
// e.g. enums
|
||||
void add(PyObject* x, const char* name)
|
||||
{ return m_class->set_attribute(name, x); }
|
||||
{ m_class->set_attribute(name, x); }
|
||||
void add(Ptr x, const char* name)
|
||||
{ return m_class->set_attribute(name, x); }
|
||||
{ m_class->set_attribute(name, x); }
|
||||
private:
|
||||
PyPtr<ExtensionClass<T, U> > m_class;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user