def generateListOperationExtendCode(to_name, expression, emit, context):
    (list_arg_name, value_arg_name) = generateChildExpressionsCode(expression=expression, emit=emit, context=context)
    emit(('assert( PyList_Check( %s ) );' % list_arg_name))
    emit(('%s = _PyList_Extend( (PyListObject *)%s, %s );' % (to_name, list_arg_name, value_arg_name)))
    getReleaseCodes(release_names=(list_arg_name, value_arg_name), emit=emit, context=context)
    getErrorExitCode(check_name=to_name, emit=emit, context=context)
    context.addCleanupTempName(to_name)
def generateListOperationExtendCode(to_name, expression, emit, context):
    (list_arg_name, value_arg_name) = generateChildExpressionsCode(expression=expression, emit=emit, context=context)
    emit(('assert( PyList_Check( %s ) );' % list_arg_name))
    emit(('%s = _PyList_Extend( (PyListObject *)%s, %s );' % (to_name, list_arg_name, value_arg_name)))
    getReleaseCodes(release_names=(list_arg_name, value_arg_name), emit=emit, context=context)
    getErrorExitCode(check_name=to_name, emit=emit, context=context)
    context.addCleanupTempName(to_name)