aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-11-19 17:52:52 +0100
committermichael-west <michael.west@ettus.com>2020-12-01 12:59:42 -0800
commit4da7d5a946df34ae3461c524600e80ea8ab15f41 (patch)
treefb670cf98533c980d45c6067c8054db5fb48533c /host/lib/types
parentb82b99cc3eed90ee19f7149eefa4f5d02d4f5a21 (diff)
downloaduhd-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 'host/lib/types')
0 files changed, 0 insertions, 0 deletions