Advertisement
Guest User

Untitled

a guest
Aug 27th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
  2. index 513c1da..fdd6416 100644
  3. --- a/gr-uhd/swig/uhd_swig.i
  4. +++ b/gr-uhd/swig/uhd_swig.i
  5. @@ -134,3 +134,22 @@ std::string get_version_string(void){
  6. std::string get_version_string(void);
  7.  
  8. #endif /* GR_HAVE_UHD */
  9. +
  10. +////////////////////////////////////////////////////////////////////////
  11. +// hook for disabling user messages
  12. +////////////////////////////////////////////////////////////////////////
  13. +
  14. +%{
  15. +
  16. +#include <uhd/utils/msg.hpp>
  17. +
  18. +void msg_handler_nop(uhd::msg::type_t, const std::string &){}
  19. +
  20. +static void disable_msgs(void)
  21. +{
  22. + uhd::msg::register_handler(&msg_handler_nop);
  23. +}
  24. +
  25. +%}
  26. +
  27. +static void disable_msgs(void);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement