[pypy-dev] small problem with return values

Armin Rigo arigo at tunes.org
Thu Mar 16 13:26:28 CET 2006


Hi Christian,

On Wed, Mar 15, 2006 at 06:00:59PM -0800, Christian Tismer wrote:
> def rtype_destruct_object(hop):
>     v_any, = hop.inputargs(hop.args_r[0])
>     return hop.genop('gc_unprotect', [v_any], resulttype=lltype.Void)

I'm not sure if it is related to your problem, but to rtype functions
with no return value we usually do:

def rtype_destruct_object(hop):
    v_any, = hop.inputargs(hop.args_r[0])
    hop.genop('gc_unprotect', [v_any])

i.e. no resulttype argument, and the rtype_xxx() function returns None
instead of a Void Variable.


A bientot,

Armin.



More information about the Pypy-dev mailing list