Issue1105

classification
Title: Exposer is generating wrong bytecode for exposed method receiving PyUnicode arguments
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7, Jython 2.5
Milestone:
process
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, leosoto
Priority: low Keywords:

Created on 2008-08-18.02:36:20 by leosoto, last changed 2014-07-26.10:06:40 by zyasoft.

Messages
msg3430 (view) Author: Leonardo Soto (leosoto) Date: 2008-08-18.02:36:19
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!).
msg3431 (view) Author: Leonardo Soto (leosoto) Date: 2008-08-18.02:41:05
This issue was worked around for array_fromunicode on r5195 in the meantime.
History
Date User Action Args
2014-07-26 10:06:40zyasoftsetstatus: open -> closed
resolution: remind -> invalid
2013-02-27 16:54:52fwierzbickisettype: behaviour
2013-02-27 16:54:37fwierzbickisetresolution: remind
versions: + Jython 2.5, Jython 2.7
2009-03-14 03:14:30fwierzbickisetpriority: normal -> low
2008-12-17 19:50:02fwierzbickisetpriority: normal
2008-08-18 12:14:00fwierzbickisetnosy: + fwierzbicki
2008-08-18 02:41:05leosotosetmessages: + msg3431
title: Compiler is generating wrong bytecode for exposed method receiving PyUnicode arguments -> Exposer is generating wrong bytecode for exposed method receiving PyUnicode arguments
2008-08-18 02:36:20leosotocreate