PageRenderTime 65ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/cln-1.3.2/src/vector/cl_SV_number_debug.cc

#
C++ | 37 lines | 22 code | 10 blank | 5 comment | 0 complexity | 2bd60eb3679239fe3885103c79efc547 MD5 | raw file
Possible License(s): GPL-2.0
  1. // cl_SV_number debugging support.
  2. // General includes.
  3. #include "base/cl_sysdep.h"
  4. // Specification.
  5. // Implementation.
  6. #include "cln/output.h"
  7. #include "cln/SV_number.h"
  8. #include "cln/io.h"
  9. #include "vector/cl_SV_io.h"
  10. namespace cln {
  11. static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z)
  12. {
  13. unused stream; // must be cl_debugout
  14. unused flags; // must be default_print_flags
  15. z.debug_print();
  16. }
  17. static void dprint (cl_heap* pointer)
  18. {
  19. var const cl_SV_number& obj = *(const cl_SV_number*)&pointer;
  20. fprint(cl_debugout, "(cl_SV_number) ");
  21. print_vector(cl_debugout,default_print_flags,&print_for_debug,obj);
  22. }
  23. AT_INITIALIZATION(dprint_SV_number)
  24. { extern cl_class& cl_class_svector_number(); cl_class_svector_number().dprint = dprint; }
  25. // This dummy links in this module when <cln/SV_number.h> requires it.
  26. int cl_SV_number_debug_module;
  27. } // namespace cln