From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 440BC1F852 for ; Sun, 23 Jan 2022 21:38:11 +0000 (UTC) Received: from localhost ([::1]:56258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBkYs-0007JQ-Gf for e@80x24.org; Sun, 23 Jan 2022 16:38:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBkYi-00075g-34 for dtas-all@nongnu.org; Sun, 23 Jan 2022 16:38:00 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:39832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBkYg-00007Y-Ho for dtas-all@nongnu.org; Sun, 23 Jan 2022 16:37:59 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A0D571F9FC for ; Sun, 23 Jan 2022 21:37:46 +0000 (UTC) From: Eric Wong To: dtas-all@nongnu.org Subject: [PATCH 2/9] player: remove omap conversion Date: Sun, 23 Jan 2022 21:37:39 +0000 Message-Id: <20220123213746.21085-3-e@80x24.org> In-Reply-To: <20220123213746.21085-1-e@80x24.org> References: <20220123213746.21085-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.71.152.64; envelope-from=e@80x24.org; helo=dcvr.yhbt.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: duct tape audio suite List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+e=80x24.org@nongnu.org Sender: "dtas-all" "omap" is specific to Ruby and makes interopability with other languages more difficult. While it's true environment variables are stored as an ordered array of C strings (see environ(7)); order doesn't matter in practice. Everyone in the real world treats the environment as an unordered key-value store. Followup-to: cac63517e7f751cc (doc: drop ordered map from examples, 2022-01-07) --- lib/dtas/player.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index 243f0b0..3db15c3 100644 --- a/lib/dtas/player.rb +++ b/lib/dtas/player.rb @@ -1,7 +1,6 @@ # Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true -require 'yaml' require 'shellwords' require_relative '../dtas' require_relative 'xs' @@ -123,10 +122,6 @@ def to_hsh rv end - def to_omap(hash) - YAML::Omap === hash ? hash : YAML::Omap.new.merge!(hash) - end - def self.load(hash) rv = new rv.instance_eval do @@ -157,7 +152,6 @@ def self.load(hash) @source_map.each do |name, src| src_hsh = v[name] or next src.load!(src_hsh) - src.env = to_omap(src.env) end source_map_reload end @@ -170,7 +164,6 @@ def self.load(hash) sinks.each do |sink_hsh| sink_hsh['name'] = -sink_hsh['name'] sink = DTAS::Sink.load(sink_hsh) - sink.env = to_omap(sink.env) @sinks[sink.name] = sink end end