Skip to content

Commit

Permalink
Add ddress to Fiddely::MemoryPointer
Browse files Browse the repository at this point in the history
Related to (#73) by @nwxxb
Thanks!
  • Loading branch information
kojix2 committed Oct 27, 2023
1 parent 93fed35 commit 8f2921e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/gr_commons/fiddley.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8f2921e

Please sign in to comment.