]> www.ginac.de Git - cln.git/blob - src/modinteger/cl_MI_debug.cc
install library as program, not as data
[cln.git] / src / modinteger / cl_MI_debug.cc
1 // cl_modint_ring debugging support.
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7
8
9 // Implementation.
10
11 #include "cln/modinteger.h"
12 #include "cln/io.h"
13 #include "cln/integer_io.h"
14
15 namespace cln {
16
17 static void dprint (cl_heap* pointer)
18 {
19         var const cl_modint_ring& obj = *(const cl_modint_ring*)&pointer;
20         fprint(cl_debugout, "(cl_modint_ring) Z mod ");
21         fprint(cl_debugout, obj->modulus);
22 }
23 AT_INITIALIZATION(dprint_modint_ring)
24 { cl_register_type_printer(cl_class_modint_ring,dprint); }
25
26 void cl_MI::debug_print () const
27 {
28         fprint(cl_debugout, *this);
29         fprint(cl_debugout, "\n");
30 }
31
32 // This dummy links in this module when <cln/modinteger.h> requires it.
33 int cl_MI_debug_module;
34
35 }  // namespace cln