#24 error on apply()

None
closed-fixed
None
5
2016-05-10
2008-05-07
Anonymous
No

If apply() is called without arguments I keep to get;

TypeError: CXX : Error creating object of type <NULL>

Following patch fixes this by being sure that no arguments means calling the Tuple(int) ctor with a capacity of 0 elements rather then the Tuple(PyObject*,owner) one with a NULL PyObject;

Index: Objects.hxx

--- Objects.hxx (revision 804477)
+++ Objects.hxx (working copy)
@@ -2810,7 +2810,7 @@

Object apply(PyObject* pargs = 0) const
{
- return apply (Tuple(pargs));
+ return apply(pargs ? Tuple(pargs) : Tuple());
}
};

Discussion

  • Barry Alan Scott

    fixed in r327.

     
  • Barry Alan Scott

    • status: open --> closed-fixed
    • assigned_to: Barry Alan Scott
    • Group: -->
     

Log in to post a comment.