From 978482703a1f7821b5fa55562fb06dbbda1975fb Mon Sep 17 00:00:00 2001
From: Botond Baranyi <botond.baranyi@ericsson.com>
Date: Tue, 19 Jan 2021 18:13:23 +0100
Subject: [PATCH] Changed enum type before '...' to int

Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com>
Change-Id: I27a6ea168b54f4d472f84f4cddb087331dd09d05
---
 compiler2/encdec.c           | 12 ++++++------
 core/ASN_Any.cc              |  6 +++---
 core/ASN_Any.hh              |  4 ++--
 core/ASN_CharacterString.cc  | 18 +++++++++---------
 core/ASN_CharacterString.hh  | 16 ++++++++--------
 core/ASN_EmbeddedPDV.cc      | 18 +++++++++---------
 core/ASN_EmbeddedPDV.hh      | 16 ++++++++--------
 core/ASN_External.cc         |  6 +++---
 core/ASN_External.hh         |  4 ++--
 core/ASN_Null.cc             |  6 +++---
 core/ASN_Null.hh             |  4 ++--
 core/Array.hh                |  8 ++++----
 core/Basetype.cc             |  6 +++---
 core/Basetype.hh             | 16 ++++++++--------
 core/Bitstring.cc            |  6 +++---
 core/Bitstring.hh            |  4 ++--
 core/Boolean.cc              |  6 +++---
 core/Boolean.hh              |  4 ++--
 core/Charstring.cc           |  6 +++---
 core/Charstring.hh           |  4 ++--
 core/Float.cc                |  6 +++---
 core/Float.hh                |  4 ++--
 core/Hexstring.cc            |  6 +++---
 core/Hexstring.hh            |  4 ++--
 core/Integer.cc              |  6 +++---
 core/Integer.hh              |  4 ++--
 core/Objid.cc                |  6 +++---
 core/Objid.hh                |  4 ++--
 core/Octetstring.cc          |  6 +++---
 core/Octetstring.hh          |  4 ++--
 core/Universal_charstring.cc |  6 +++---
 core/Universal_charstring.hh |  4 ++--
 core/Verdicttype.cc          |  6 +++---
 core/Verdicttype.hh          |  4 ++--
 core2/Basetype2.cc           | 12 ++++++------
 35 files changed, 126 insertions(+), 126 deletions(-)

diff --git a/compiler2/encdec.c b/compiler2/encdec.c
index eba7af45f..31d0ed6ed 100644
--- a/compiler2/encdec.c
+++ b/compiler2/encdec.c
@@ -35,9 +35,9 @@ void def_encdec(const char *p_classname,
   def=mputstr
     (def,
      "void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&,"
-     " TTCN_EncDec::coding_t, ...) const;\n"
+     " int, ...) const;\n"
      "void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&,"
-     " TTCN_EncDec::coding_t, ...);\n");
+     " int, ...);\n");
   if(ber)
     def=mputstr(def,
      "ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,"
@@ -93,10 +93,10 @@ void def_encdec(const char *p_classname,
 
   src=mputprintf(src,
      "void %s::encode(const TTCN_Typedescriptor_t& p_td,"
-     " TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const\n"
+     " TTCN_Buffer& p_buf, int p_coding, ...) const\n"
      "{\n"
      "  va_list pvar;\n"
-     "  va_start(pvar, (int)p_coding);\n"
+     "  va_start(pvar, p_coding);\n"
      "  switch(p_coding) {\n"
      "  case TTCN_EncDec::CT_BER: {\n"
      "    TTCN_EncDec_ErrorContext ec(\"While BER-encoding type"
@@ -173,10 +173,10 @@ void def_encdec(const char *p_classname,
      "// written by %s in " __FILE__ " at %d\n"
 #endif
      "void %s::decode(const TTCN_Typedescriptor_t& p_td,"
-     " TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)\n"
+     " TTCN_Buffer& p_buf, int p_coding, ...)\n"
      "{\n"
      "  va_list pvar;\n"
-     "  va_start(pvar, (int)p_coding);\n"
+     "  va_start(pvar, p_coding);\n"
      "  switch(p_coding) {\n"
      "  case TTCN_EncDec::CT_BER: {\n"
      "    TTCN_EncDec_ErrorContext ec(\"While BER-decoding type"
diff --git a/core/ASN_Any.cc b/core/ASN_Any.cc
index b17c77478..6668710c3 100644
--- a/core/ASN_Any.cc
+++ b/core/ASN_Any.cc
@@ -21,7 +21,7 @@
 
 void ASN_ANY::encode(const TTCN_Typedescriptor_t& p_td,
                      TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...) const
+                     int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -53,10 +53,10 @@ void ASN_ANY::encode(const TTCN_Typedescriptor_t& p_td,
 
 void ASN_ANY::decode(const TTCN_Typedescriptor_t& p_td,
                      TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...)
+                     int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/ASN_Any.hh b/core/ASN_Any.hh
index a233f5cb8..c18768792 100644
--- a/core/ASN_Any.hh
+++ b/core/ASN_Any.hh
@@ -37,10 +37,10 @@ public:
 #endif
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/ASN_CharacterString.cc b/core/ASN_CharacterString.cc
index 8a7542ad5..da4586ede 100644
--- a/core/ASN_CharacterString.cc
+++ b/core/ASN_CharacterString.cc
@@ -661,8 +661,8 @@ void CHARACTER_STRING_identification::decode_text(Text_Buf& text_buf)
 }
 
 /* not called
-void CHARACTER_STRING_identification::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
-void CHARACTER_STRING_identification::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+void CHARACTER_STRING_identification::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
+void CHARACTER_STRING_identification::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 */
 
 ASN_BER_TLV_t *CHARACTER_STRING_identification::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const
@@ -1741,8 +1741,8 @@ void CHARACTER_STRING_identification_syntaxes::decode_text(Text_Buf& text_buf)
 }
 
 /* not called
-void CHARACTER_STRING_identification_syntaxes::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
-void CHARACTER_STRING_identification_syntaxes::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+void CHARACTER_STRING_identification_syntaxes::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
+void CHARACTER_STRING_identification_syntaxes::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 */
 
 ASN_BER_TLV_t* CHARACTER_STRING_identification_syntaxes::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const
@@ -2473,8 +2473,8 @@ void CHARACTER_STRING_identification_context__negotiation::decode_text(Text_Buf&
 }
 
 /* not called
-void CHARACTER_STRING_identification_context__negotiation::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
-void CHARACTER_STRING_identification_context__negotiation::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+void CHARACTER_STRING_identification_context__negotiation::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
+void CHARACTER_STRING_identification_context__negotiation::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 */
 
 ASN_BER_TLV_t* CHARACTER_STRING_identification_context__negotiation::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const
@@ -3228,7 +3228,7 @@ void CHARACTER_STRING::decode_text(Text_Buf& text_buf)
   field_string__value.decode_text(text_buf);
 }
 
-void CHARACTER_STRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+void CHARACTER_STRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -3268,10 +3268,10 @@ void CHARACTER_STRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_
   va_end(pvar);
 }
 
-void CHARACTER_STRING::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+void CHARACTER_STRING::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/ASN_CharacterString.hh b/core/ASN_CharacterString.hh
index bcdbf46e6..2d507aa3d 100644
--- a/core/ASN_CharacterString.hh
+++ b/core/ASN_CharacterString.hh
@@ -94,8 +94,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t& p_td,
@@ -218,8 +218,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t& p_td,
@@ -327,8 +327,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t& p_td,
@@ -445,8 +445,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, unsigned int, int, embed_values_enc_struct_t*) const;
diff --git a/core/ASN_EmbeddedPDV.cc b/core/ASN_EmbeddedPDV.cc
index 4e8e7137d..10f6a5d93 100644
--- a/core/ASN_EmbeddedPDV.cc
+++ b/core/ASN_EmbeddedPDV.cc
@@ -649,8 +649,8 @@ void EMBEDDED_PDV_identification::decode_text(Text_Buf& text_buf)
 }
 
 // No encode/decode for this implementation class
-//void EMBEDDED_PDV_identification::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
-//void EMBEDDED_PDV_identification::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+//void EMBEDDED_PDV_identification::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
+//void EMBEDDED_PDV_identification::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 
 ASN_BER_TLV_t *EMBEDDED_PDV_identification::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const
 {
@@ -1799,8 +1799,8 @@ void EMBEDDED_PDV_identification_syntaxes::decode_text(Text_Buf& text_buf)
 }
 
 // No encode/decode for this implementation class
-//void EMBEDDED_PDV_identification_syntaxes::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
-//void EMBEDDED_PDV_identification_syntaxes::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+//void EMBEDDED_PDV_identification_syntaxes::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
+//void EMBEDDED_PDV_identification_syntaxes::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 
 ASN_BER_TLV_t* EMBEDDED_PDV_identification_syntaxes::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const
 {
@@ -2552,8 +2552,8 @@ void EMBEDDED_PDV_identification_context__negotiation::decode_text(Text_Buf& tex
 }
 
 // No encode/decode for this implementation class
-//void EMBEDDED_PDV_identification_context__negotiation::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
-//void EMBEDDED_PDV_identification_context__negotiation::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+//void EMBEDDED_PDV_identification_context__negotiation::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
+//void EMBEDDED_PDV_identification_context__negotiation::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 
 
 ASN_BER_TLV_t* EMBEDDED_PDV_identification_context__negotiation::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const
@@ -3327,7 +3327,7 @@ void EMBEDDED_PDV::decode_text(Text_Buf& text_buf)
   field_data__value.decode_text(text_buf);
 }
 
-void EMBEDDED_PDV::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+void EMBEDDED_PDV::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -3372,10 +3372,10 @@ void EMBEDDED_PDV::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
   va_end(pvar);
 }
 
-void EMBEDDED_PDV::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+void EMBEDDED_PDV::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/ASN_EmbeddedPDV.hh b/core/ASN_EmbeddedPDV.hh
index 27490936e..3aae96bc2 100644
--- a/core/ASN_EmbeddedPDV.hh
+++ b/core/ASN_EmbeddedPDV.hh
@@ -94,8 +94,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t& p_td,
@@ -220,8 +220,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, unsigned int, int, embed_values_enc_struct_t*) const;
@@ -329,8 +329,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, unsigned int, int, embed_values_enc_struct_t*) const;
@@ -444,8 +444,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, unsigned int, int, embed_values_enc_struct_t*) const;
diff --git a/core/ASN_External.cc b/core/ASN_External.cc
index 048863f86..c5cbfe46d 100644
--- a/core/ASN_External.cc
+++ b/core/ASN_External.cc
@@ -3542,7 +3542,7 @@ void EXTERNAL::decode_text(Text_Buf& text_buf)
   field_data__value.decode_text(text_buf);
 }
 
-void EXTERNAL::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+void EXTERNAL::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -3587,10 +3587,10 @@ void EXTERNAL::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTC
   va_end(pvar);
 }
 
-void EXTERNAL::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+void EXTERNAL::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/ASN_External.hh b/core/ASN_External.hh
index 25488f132..b7b855171 100644
--- a/core/ASN_External.hh
+++ b/core/ASN_External.hh
@@ -418,8 +418,8 @@ public:
   void set_param(Module_Param& param);
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
-  void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
-  void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+  void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const;
+  void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...);
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t& p_td,
diff --git a/core/ASN_Null.cc b/core/ASN_Null.cc
index 6891f810c..7eefdbf5a 100644
--- a/core/ASN_Null.cc
+++ b/core/ASN_Null.cc
@@ -121,7 +121,7 @@ void ASN_NULL::decode_text(Text_Buf&)
 }
 
 void ASN_NULL::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                      TTCN_EncDec::coding_t p_coding, ...) const
+                      int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -163,10 +163,10 @@ void ASN_NULL::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void ASN_NULL::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                      TTCN_EncDec::coding_t p_coding, ...)
+                      int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/ASN_Null.hh b/core/ASN_Null.hh
index 1c9ad3d14..fb16c7b2e 100644
--- a/core/ASN_Null.hh
+++ b/core/ASN_Null.hh
@@ -72,10 +72,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Array.hh b/core/Array.hh
index 36ee34095..5f09f6cfd 100644
--- a/core/Array.hh
+++ b/core/Array.hh
@@ -984,8 +984,8 @@ public:
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
 
-  void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
-  void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+  void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...) const;
+  void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...);
   
   virtual const TTCN_Typedescriptor_t* get_elem_descr() const 
   { TTCN_error("Internal error: VALUE_ARRAY<>::get_elem_descr() called."); }
@@ -1314,7 +1314,7 @@ void VALUE_ARRAY<T_type,array_size,index_offset>::decode_text
 
 template <typename T_type, unsigned int array_size, int index_offset>
 void VALUE_ARRAY<T_type,array_size,index_offset>::encode(
-  const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+  const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -1335,7 +1335,7 @@ void VALUE_ARRAY<T_type,array_size,index_offset>::encode(
 
 template <typename T_type, unsigned int array_size, int index_offset>
 void VALUE_ARRAY<T_type,array_size,index_offset>::decode(
-  const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+  const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
 {
   switch(p_coding) {
   case TTCN_EncDec::CT_JSON: {
diff --git a/core/Basetype.cc b/core/Basetype.cc
index 84c1604bc..1c92d0750 100644
--- a/core/Basetype.cc
+++ b/core/Basetype.cc
@@ -54,7 +54,7 @@ void Base_Type::log() const
 }
 
 void Base_Type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                       TTCN_EncDec::coding_t p_coding, ...) const
+                       int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -117,10 +117,10 @@ void Base_Type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void Base_Type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                       TTCN_EncDec::coding_t p_coding, ...)
+                       int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Basetype.hh b/core/Basetype.hh
index ee6d9dfd5..add2b7acc 100644
--- a/core/Basetype.hh
+++ b/core/Basetype.hh
@@ -260,7 +260,7 @@ public:
 
   */
   VIRTUAL_IF_RUNTIME_2 void encode(const TTCN_Typedescriptor_t& p_td,
-    TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
+    TTCN_Buffer& p_buf, int p_coding, ...) const;
 
   /** @brief Decode an instance of this object
 
@@ -272,7 +272,7 @@ public:
 
   */
   VIRTUAL_IF_RUNTIME_2 void decode(const TTCN_Typedescriptor_t& p_td,
-    TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
+    TTCN_Buffer& p_buf, int p_coding, ...);
 
 protected:
   /** Check type descriptor for BER encoding
@@ -812,8 +812,8 @@ public:
 
   virtual void BER_decode_opentypes(TTCN_Type_list& p_typelist, unsigned L_form);
 
-  virtual void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
-  virtual void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+  virtual void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...) const;
+  virtual void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...);
 
   virtual ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   virtual ASN_BER_TLV_t* BER_encode_TLV_negtest(const Erroneous_descriptor_t* p_err_descr, const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
@@ -982,8 +982,8 @@ public:
   virtual void encode_text(Text_Buf& text_buf) const;
   virtual void decode_text(Text_Buf& text_buf);
 
-  virtual void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
-  virtual void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+  virtual void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...) const;
+  virtual void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...);
 
   virtual ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   virtual ASN_BER_TLV_t* BER_encode_TLV_negtest(const Erroneous_descriptor_t* p_err_descr,
@@ -1085,8 +1085,8 @@ public:
   virtual void encode_text(Text_Buf& text_buf) const;
   virtual void decode_text(Text_Buf& text_buf);
 
-  virtual void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
-  virtual void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+  virtual void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...) const;
+  virtual void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, ...);
 
   virtual ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
   virtual boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
diff --git a/core/Bitstring.cc b/core/Bitstring.cc
index 229f81bc9..28e6d0b84 100644
--- a/core/Bitstring.cc
+++ b/core/Bitstring.cc
@@ -644,7 +644,7 @@ void BITSTRING::decode_text(Text_Buf& text_buf)
 }
 
 void BITSTRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                       TTCN_EncDec::coding_t p_coding, ...) const
+                       int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -697,10 +697,10 @@ void BITSTRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void BITSTRING::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                       TTCN_EncDec::coding_t p_coding, ...)
+                       int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Bitstring.hh b/core/Bitstring.hh
index 0795bac7a..61e879a92 100644
--- a/core/Bitstring.hh
+++ b/core/Bitstring.hh
@@ -174,10 +174,10 @@ private:
                        unsigned int& bitnum_start);
 public:
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Boolean.cc b/core/Boolean.cc
index 7f92f3d0e..5000c616d 100644
--- a/core/Boolean.cc
+++ b/core/Boolean.cc
@@ -204,7 +204,7 @@ Module_Param* BOOLEAN::get_param(Module_Param_Name& /* param_name */) const
 #endif
 
 void BOOLEAN::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...) const
+                     int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -264,10 +264,10 @@ void BOOLEAN::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void BOOLEAN::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...)
+                     int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Boolean.hh b/core/Boolean.hh
index 48a11a6a2..ea14bd118 100644
--- a/core/Boolean.hh
+++ b/core/Boolean.hh
@@ -95,10 +95,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Charstring.cc b/core/Charstring.cc
index 6c1f81f58..6efe3f955 100644
--- a/core/Charstring.cc
+++ b/core/Charstring.cc
@@ -796,7 +796,7 @@ void CHARSTRING::decode_text(Text_Buf& text_buf)
 
 void CHARSTRING::encode(const TTCN_Typedescriptor_t& p_td,
                         TTCN_Buffer& p_buf,
-                        TTCN_EncDec::coding_t p_coding, ...) const
+                        int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -858,10 +858,10 @@ void CHARSTRING::encode(const TTCN_Typedescriptor_t& p_td,
 
 void CHARSTRING::decode(const TTCN_Typedescriptor_t& p_td,
                         TTCN_Buffer& p_buf,
-                        TTCN_EncDec::coding_t p_coding, ...)
+                        int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Charstring.hh b/core/Charstring.hh
index 9a8704f4b..0e172388f 100644
--- a/core/Charstring.hh
+++ b/core/Charstring.hh
@@ -219,10 +219,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Float.cc b/core/Float.cc
index 5c3e76aa8..8b48d90f8 100644
--- a/core/Float.cc
+++ b/core/Float.cc
@@ -347,7 +347,7 @@ void FLOAT::decode_text(Text_Buf& text_buf)
 }
 
 void FLOAT::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                   TTCN_EncDec::coding_t p_coding, ...) const
+                   int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -400,10 +400,10 @@ void FLOAT::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void FLOAT::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                   TTCN_EncDec::coding_t p_coding, ...)
+                   int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Float.hh b/core/Float.hh
index aca7ac898..4c808ddb4 100644
--- a/core/Float.hh
+++ b/core/Float.hh
@@ -128,10 +128,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Hexstring.cc b/core/Hexstring.cc
index 25943e523..35799bc14 100644
--- a/core/Hexstring.cc
+++ b/core/Hexstring.cc
@@ -664,7 +664,7 @@ Module_Param* HEXSTRING::get_param(Module_Param_Name& /* param_name */) const
 #endif
 
 void HEXSTRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-  TTCN_EncDec::coding_t p_coding, ...) const
+  int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -701,10 +701,10 @@ void HEXSTRING::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void HEXSTRING::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-  TTCN_EncDec::coding_t p_coding, ...)
+  int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch (p_coding) {
   case TTCN_EncDec::CT_RAW: {
     TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name);
diff --git a/core/Hexstring.hh b/core/Hexstring.hh
index 7e415ead8..89c9fddb3 100644
--- a/core/Hexstring.hh
+++ b/core/Hexstring.hh
@@ -135,10 +135,10 @@ public:
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
   /** Encodes the value of the variable according to the
     * TTCN_Typedescriptor_t. It must be public because called by
     * another types during encoding. Returns the length of encoded data*/
diff --git a/core/Integer.cc b/core/Integer.cc
index d4f7ddc01..1f8d77417 100644
--- a/core/Integer.cc
+++ b/core/Integer.cc
@@ -754,7 +754,7 @@ void INTEGER::decode_text(Text_Buf& text_buf)
 }
 
 void INTEGER::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...) const
+                     int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -814,10 +814,10 @@ void INTEGER::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void INTEGER::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...)
+                     int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Integer.hh b/core/Integer.hh
index 5608980f2..783953a78 100644
--- a/core/Integer.hh
+++ b/core/Integer.hh
@@ -153,10 +153,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Objid.cc b/core/Objid.cc
index 200225d7f..dff4ad30f 100644
--- a/core/Objid.cc
+++ b/core/Objid.cc
@@ -278,7 +278,7 @@ void OBJID::decode_text(Text_Buf& text_buf)
 }
 
 void OBJID::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                   TTCN_EncDec::coding_t p_coding, ...) const
+                   int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -324,10 +324,10 @@ void OBJID::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void OBJID::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                   TTCN_EncDec::coding_t p_coding, ...)
+                   int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Objid.hh b/core/Objid.hh
index 812cd50e1..eb79f4b98 100644
--- a/core/Objid.hh
+++ b/core/Objid.hh
@@ -93,10 +93,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&,
-              TTCN_EncDec::coding_t, ...) const;
+              int, ...) const;
 
   void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&,
-              TTCN_EncDec::coding_t, ...);
+              int, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Octetstring.cc b/core/Octetstring.cc
index 21e2b705c..f4ef7e142 100644
--- a/core/Octetstring.cc
+++ b/core/Octetstring.cc
@@ -598,7 +598,7 @@ void OCTETSTRING::decode_text(Text_Buf& text_buf)
 
 void OCTETSTRING::encode(const TTCN_Typedescriptor_t& p_td,
                          TTCN_Buffer& p_buf,
-                         TTCN_EncDec::coding_t p_coding, ...) const
+                         int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -659,10 +659,10 @@ void OCTETSTRING::encode(const TTCN_Typedescriptor_t& p_td,
 
 void OCTETSTRING::decode(const TTCN_Typedescriptor_t& p_td,
                          TTCN_Buffer& p_buf,
-                         TTCN_EncDec::coding_t p_coding, ...)
+                         int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Octetstring.hh b/core/Octetstring.hh
index 218b1f3f7..e79c3b7f3 100644
--- a/core/Octetstring.hh
+++ b/core/Octetstring.hh
@@ -145,10 +145,10 @@ public:
 
 public:
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Universal_charstring.cc b/core/Universal_charstring.cc
index 14b03ef24..2d64f1150 100644
--- a/core/Universal_charstring.cc
+++ b/core/Universal_charstring.cc
@@ -1096,7 +1096,7 @@ void UNIVERSAL_CHARSTRING::decode_text(Text_Buf& text_buf)
 }
 
 void UNIVERSAL_CHARSTRING::encode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+  TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -1165,10 +1165,10 @@ void UNIVERSAL_CHARSTRING::encode(const TTCN_Typedescriptor_t& p_td,
 }
 
 void UNIVERSAL_CHARSTRING::decode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+  TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
   case TTCN_EncDec::CT_BER: {
     TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
diff --git a/core/Universal_charstring.hh b/core/Universal_charstring.hh
index 26e7b64e3..8165cd0ab 100644
--- a/core/Universal_charstring.hh
+++ b/core/Universal_charstring.hh
@@ -339,9 +339,9 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-    TTCN_EncDec::coding_t p_coding, ...) const;
+    int p_coding, ...) const;
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-    TTCN_EncDec::coding_t p_coding, ...);
+    int p_coding, ...);
 
   ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td,
                                 unsigned p_coding) const;
diff --git a/core/Verdicttype.cc b/core/Verdicttype.cc
index c02b994d5..6524f3975 100644
--- a/core/Verdicttype.cc
+++ b/core/Verdicttype.cc
@@ -149,7 +149,7 @@ void VERDICTTYPE::decode_text(Text_Buf& text_buf)
 }
 
 void VERDICTTYPE::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...) const
+                     int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -205,10 +205,10 @@ void VERDICTTYPE::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
 }
 
 void VERDICTTYPE::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-                     TTCN_EncDec::coding_t p_coding, ...)
+                     int p_coding, ...)
 {
   va_list pvar;
-  va_start(pvar, (int)p_coding);
+  va_start(pvar, p_coding);
   switch(p_coding) {
 #if 0
   case TTCN_EncDec::CT_RAW: {
diff --git a/core/Verdicttype.hh b/core/Verdicttype.hh
index c7a62a773..b2cfb6399 100644
--- a/core/Verdicttype.hh
+++ b/core/Verdicttype.hh
@@ -92,10 +92,10 @@ public:
   void decode_text(Text_Buf& text_buf);
 
   void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...) const;
+              int p_coding, ...) const;
 
   void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf,
-              TTCN_EncDec::coding_t p_coding, ...);
+              int p_coding, ...);
 
   int XER_encode(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf,
     unsigned int flavor, unsigned int flavor2, int indent, embed_values_enc_struct_t*) const;
diff --git a/core2/Basetype2.cc b/core2/Basetype2.cc
index ce198744f..a24b678c7 100644
--- a/core2/Basetype2.cc
+++ b/core2/Basetype2.cc
@@ -1818,7 +1818,7 @@ void Record_Of_Type::OER_decode_opentypes(TTCN_Type_list& p_typelist, TTCN_Buffe
 }
 
 void Record_Of_Type::encode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+  TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -1875,7 +1875,7 @@ void Record_Of_Type::encode(const TTCN_Typedescriptor_t& p_td,
 }
 
 void Record_Of_Type::decode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+  TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -3014,7 +3014,7 @@ void Record_Type::set_value(const Base_Type* other_value)
 }
 
 void Record_Type::encode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+  TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -3071,7 +3071,7 @@ void Record_Type::encode(const TTCN_Typedescriptor_t& p_td,
 }
 
 void Record_Type::decode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+  TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -7276,7 +7276,7 @@ void Empty_Record_Type::set_value(const Base_Type* other_value)
 }
 
 void Empty_Record_Type::encode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const
+  TTCN_Buffer& p_buf, int p_coding, ...) const
 {
   va_list pvar;
   va_start(pvar, p_coding);
@@ -7333,7 +7333,7 @@ void Empty_Record_Type::encode(const TTCN_Typedescriptor_t& p_td,
 }
 
 void Empty_Record_Type::decode(const TTCN_Typedescriptor_t& p_td,
-  TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...)
+  TTCN_Buffer& p_buf, int p_coding, ...)
 {
   va_list pvar;
   va_start(pvar, p_coding);
-- 
GitLab