From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CA5361384B4 for ; Thu, 17 Dec 2015 22:06:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5CF1C21C0A2; Thu, 17 Dec 2015 22:03:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9456C21C09E for ; Thu, 17 Dec 2015 22:03:33 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 95B2D340564; Thu, 17 Dec 2015 22:03:26 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 5/5] python-any-r1.eclass: Use reverse iter instead of reversing impls array Date: Thu, 17 Dec 2015 23:02:58 +0100 Message-Id: <1450389778-10144-6-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1450389778-10144-1-git-send-email-mgorny@gentoo.org> References: <1450389778-10144-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 247217d0-54d5-4659-bdf0-1069ebebaa1d X-Archives-Hash: 9dd30651034bfe012b748dec3540b9ca --- eclass/python-any-r1.eclass | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index 99aac73..c6dfc9c 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -313,13 +313,9 @@ python_setup() { done # fallback to best installed impl. - local rev_impls=() - for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - rev_impls=( "${i}" "${rev_impls[@]}" ) - done - - for i in "${rev_impls[@]}"; do - python_export "${i}" EPYTHON PYTHON + # (reverse iteration over _PYTHON_SUPPORTED_IMPLS) + for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do + python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON if _python_EPYTHON_supported "${EPYTHON}"; then python_wrapper_setup return -- 2.6.4