diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-11-19 17:52:52 +0100 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2020-12-01 12:59:42 -0800 |
commit | 4da7d5a946df34ae3461c524600e80ea8ab15f41 (patch) | |
tree | fb670cf98533c980d45c6067c8054db5fb48533c /fpga/usrp3 | |
parent | b82b99cc3eed90ee19f7149eefa4f5d02d4f5a21 (diff) | |
download | uhd-4da7d5a946df34ae3461c524600e80ea8ab15f41.tar.gz uhd-4da7d5a946df34ae3461c524600e80ea8ab15f41.tar.bz2 uhd-4da7d5a946df34ae3461c524600e80ea8ab15f41.zip |
python: multi_usrp: Let get_tree() return a raw pointer
This changes the Python version of MultiUSRP.get_tree() such that it
returns a raw pointer to the tree instead of returning the sptr.
This fixes an issue where calling get_tree() will reliably cause
a segfault during garbage collection, at least on some USRPs.
The downside of this approach is that storing the return value from
get_tree() can produce a dangling pointer when the underlying object is
destroyed. It's still better than segfaults, and the recommended way to
use get_tree() anyway is not to store the return value (unless it's in
a local scope), but tack on property tree methods to get_tree() itself.
Examples:
>>> usrp = uhd.usrp.MultiUSRP('...')
>>> usrp.get_tree().exists('/path/to/prop') # This is fine
This change has no noticable API changes.
Diffstat (limited to 'fpga/usrp3')
0 files changed, 0 insertions, 0 deletions