diff --git a/lib/gr_commons/fiddley.rb b/lib/gr_commons/fiddley.rb index 8234aee..6c8383b 100644 --- a/lib/gr_commons/fiddley.rb +++ b/lib/gr_commons/fiddley.rb @@ -198,6 +198,10 @@ def to_ptr @ptr end + def address + @ptr.to_i + end + { 8 => 'c', 16 => 's', 32 => 'l', 64 => 'q' }.each do |bits, form| bytes = bits / 8