From bf9787ac517fe19af5fd6ba918a66b220fcbc923 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 11 Jan 2022 18:21:04 +0000 Subject: deduplicate and freeze pathnames + metadata This ought to save some memory for dtas-player and dtas-readahead users with multiple instances of the same track(s) on their track list. --- lib/dtas/sigevent/fiddle_efd.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/dtas/sigevent/fiddle_efd.rb') diff --git a/lib/dtas/sigevent/fiddle_efd.rb b/lib/dtas/sigevent/fiddle_efd.rb index 40cec77..ec9ec65 100644 --- a/lib/dtas/sigevent/fiddle_efd.rb +++ b/lib/dtas/sigevent/fiddle_efd.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2020 all contributors +# Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true @@ -13,7 +13,7 @@ class DTAS::Sigevent # :nodoc: Fiddle::TYPE_INT) # fd attr_reader :to_io - ONE = [ 1 ].pack('Q').freeze + ONE = -([ 1 ].pack('Q')) def initialize fd = EventFD.call(0, 02000000|00004000) # EFD_CLOEXEC|EFD_NONBLOCK -- cgit v1.2.3-24-ge0c7