Message3430

Author leosoto
Recipients leosoto
Date 2008-08-18.02:36:19
SpamBayes Score 4.807649e-08
Marked as misclassified No
Message-id <1219026980.11.0.591392533086.issue1105@psf.upfronthosting.co.za>
In-reply-to
Content
As seen on http://pylonshq.com/pasties/934 , the expsed method for
PyArray#array_fromunicode wasn't passing verification. The problem is a
missing casting operation on the generated code (decompiled with jad):

    public PyObject __call__(PyObject pyobject)
    {
        ((PyArray)self).array_fromunicode(pyobject);
        return Py.None;
    }

[The array_fromunicode method receives a PyUnicode, not a PyObject]

By casual looking at MethodExposer#generateCall looks like we are not
supporting arguments of other types than PyObject, String and primitives
on exposed method. 

We should either document this behaviour, or fix it, by adding the
appropriate type-checking to the code generated by
MethodExposer#generateCall (it should NOT throw ClassCastExceptions!).
History
Date User Action Args
2008-08-18 02:36:20leosotosetrecipients: + leosoto
2008-08-18 02:36:20leosotosetmessageid: <1219026980.11.0.591392533086.issue1105@psf.upfronthosting.co.za>
2008-08-18 02:36:20leosotolinkissue1105 messages
2008-08-18 02:36:19leosotocreate