diff --git a/core/Module_list.cc b/core/Module_list.cc index d52969013fbd7943455b2a3cd4969c389d949073..658176564f3556230c397568800743e1fde0b766 100644 --- a/core/Module_list.cc +++ b/core/Module_list.cc @@ -425,11 +425,7 @@ void Module_List::push_version(Text_Buf& text_buf) text_buf.push_int(n_modules); for (TTCN_Module *list_iter = list_head; list_iter != NULL; list_iter = list_iter->list_next) { - text_buf.push_string(list_iter->module_name); - if (list_iter->md5_checksum != NULL) { - text_buf.push_int(16); - text_buf.push_raw(16, list_iter->md5_checksum); - } else text_buf.push_int((RInt)0); + list_iter->push_version(text_buf); } } @@ -1231,6 +1227,17 @@ void TTCN_Module::list_testcases() printf("%s.%s\n", module_name, list_iter->testcase_name); } +void TTCN_Module::push_version(Text_Buf& text_buf) +{ + text_buf.push_string(module_name); + if (md5_checksum != NULL) { + text_buf.push_int(16); + text_buf.push_raw(16, md5_checksum); + } else { + text_buf.push_int((RInt)0); + } +} + const namespace_t *TTCN_Module::get_ns(size_t p_index) const { if (p_index == (size_t)-1) return NULL; diff --git a/core/Module_list.hh b/core/Module_list.hh index 1a081d2ee5b86c0d0dc98868191b25d8e58b7815..0e04f1e98a60f6499d9a26080c2adfa250b25cb9 100644 --- a/core/Module_list.hh +++ b/core/Module_list.hh @@ -232,6 +232,7 @@ public: void print_version(); ModuleVersion* get_version() const; void list_testcases(); + void push_version(Text_Buf& text_buf); size_t get_num_ns() const { return num_namespaces; } const namespace_t *get_ns(size_t p_index) const; const namespace_t *get_controlns() const;