(resty)
return codegen
The common codegen for iterator intrinsics.

    Populates the iterator struct and increfs.
The common codegen for iterator intrinsics.
The common codegen for iterator intrinsics .
def _iterator_codegen(resty):
    """The common codegen for iterator intrinsics.

    Populates the iterator struct and increfs.
    """

    def codegen(context, builder, sig, args):
        [d] = args
        [td] = sig.args
        iterhelper = context.make_helper(builder, resty)
        iterhelper.parent = d
        iterhelper.state = iterhelper.state.type(None)
        return impl_ret_borrowed(
            context,
            builder,
            resty,
            iterhelper._getvalue(),
        )

    return codegen
def _iterator_codegen ( resty ) : def codegen ( context , builder , sig , args ) : [ d ] = args [ td ] = sig . args iterhelper = context . make_helper ( builder , resty ) iterhelper . parent = d iterhelper . state = iterhelper . state . type ( None ) return impl_ret_borrowed ( context , builder , resty , iterhelper . _getvalue ( ) , ) return codegen