Commit b603df6d authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files
parents d5ee84d6 8b676fa6
......@@ -6567,7 +6567,7 @@ namespace Ttcn {
error("Only `prototype(convert)' is allowed for %s encoding functions",
Type::get_encoding_name(encoding_type));
}
else {
else if (input_type->is_ref()) {
// let the input type know that this is its encoding function
input_type->get_type_refd()->set_coding_function(true, this);
// treat this as a manual external function during code generation
......@@ -6689,7 +6689,7 @@ namespace Ttcn {
error("Only `prototype(sliding)' is allowed for %s decoding functions",
Type::get_encoding_name(encoding_type));
}
else if (output_type) {
else if (output_type != NULL && output_type->is_ref()) {
// let the output type know that this is its decoding function
output_type->get_type_refd()->set_coding_function(false, this);
// treat this as a manual external function during code generation
......
......@@ -122,5 +122,18 @@ external function f_enc_choice1(in Choice x) return bitstring
external function f_enc_choice2(in Choice x) return bitstring
with { extension "prototype(convert) encode(PER)" }
/* external function declarations for nonexistent types */
external function f_enc_non1(in NonExistent x) return bitstring //^In external function definition// //^In formal parameter list// //^In parameter// //There is no local or imported definition with name//
with { extension "prototype(convert) encode(JSON)" }
external function f_enc_non2(in NonExistent x) return bitstring //^In external function definition// //^In formal parameter list// //^In parameter// //There is no local or imported definition with name//
with { extension "prototype(convert) encode(PER)" }
external function f_dec_non1(inout bitstring x, out NonExistent y) return integer //^In external function definition// //^In formal parameter list// //^In parameter// //There is no local or imported definition with name//
with { extension "prototype(sliding) decode(BER)" }
external function f_dec_non2(inout bitstring x, out NonExistent y) return integer //^In external function definition// //^In formal parameter list// //^In parameter// //There is no local or imported definition with name//
with { extension "prototype(sliding) decode(PER)" }
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment