Ported uAMQP bug fix to C++ repo (#5291)
This commit is contained in:
parent
76c82f0b9e
commit
47bf038701
@ -7,7 +7,7 @@
|
||||
// The generator that produces it is located at /uamqp_generator/uamqp_generator.sln
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
#include "azure_c_shared_utility/optimize_size.h"
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_uamqp_c/amqpvalue.h"
|
||||
#include "azure_uamqp_c/amqp_definitions.h"
|
||||
@ -146,7 +146,6 @@ ERROR_HANDLE error_create(const char* condition_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(condition_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
error_destroy(error_instance);
|
||||
@ -679,7 +678,6 @@ OPEN_HANDLE open_create(const char* container_id_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(container_id_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
open_destroy(open_instance);
|
||||
@ -1602,22 +1600,18 @@ int open_get_outgoing_locales(OPEN_HANDLE open, AMQP_VALUE* outgoing_locales_val
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_ietf_language_tag(outgoing_locales_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*outgoing_locales_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*outgoing_locales_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*outgoing_locales_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(open_instance->composite_value, 5, *outgoing_locales_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*outgoing_locales_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -1749,22 +1743,18 @@ int open_get_incoming_locales(OPEN_HANDLE open, AMQP_VALUE* incoming_locales_val
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_ietf_language_tag(incoming_locales_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*incoming_locales_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*incoming_locales_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*incoming_locales_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(open_instance->composite_value, 6, *incoming_locales_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*incoming_locales_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -1896,22 +1886,18 @@ int open_get_offered_capabilities(OPEN_HANDLE open, AMQP_VALUE* offered_capabili
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(offered_capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*offered_capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(open_instance->composite_value, 7, *offered_capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -2043,22 +2029,18 @@ int open_get_desired_capabilities(OPEN_HANDLE open, AMQP_VALUE* desired_capabili
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(desired_capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*desired_capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(open_instance->composite_value, 8, *desired_capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -2266,7 +2248,6 @@ BEGIN_HANDLE begin_create(transfer_number next_outgoing_id_value, uint32_t incom
|
||||
amqpvalue_destroy(next_outgoing_id_amqp_value);
|
||||
amqpvalue_destroy(incoming_window_amqp_value);
|
||||
amqpvalue_destroy(outgoing_window_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
begin_destroy(begin_instance);
|
||||
@ -3141,22 +3122,18 @@ int begin_get_offered_capabilities(BEGIN_HANDLE begin, AMQP_VALUE* offered_capab
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(offered_capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*offered_capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(begin_instance->composite_value, 5, *offered_capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -3288,22 +3265,18 @@ int begin_get_desired_capabilities(BEGIN_HANDLE begin, AMQP_VALUE* desired_capab
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(desired_capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*desired_capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(begin_instance->composite_value, 6, *desired_capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -3511,7 +3484,6 @@ ATTACH_HANDLE attach_create(const char* name_value, handle handle_value, role ro
|
||||
amqpvalue_destroy(name_amqp_value);
|
||||
amqpvalue_destroy(handle_amqp_value);
|
||||
amqpvalue_destroy(role_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
attach_destroy(attach_instance);
|
||||
@ -5056,22 +5028,18 @@ int attach_get_offered_capabilities(ATTACH_HANDLE attach, AMQP_VALUE* offered_ca
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(offered_capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*offered_capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(attach_instance->composite_value, 11, *offered_capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*offered_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -5203,22 +5171,18 @@ int attach_get_desired_capabilities(ATTACH_HANDLE attach, AMQP_VALUE* desired_ca
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(desired_capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*desired_capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(attach_instance->composite_value, 12, *desired_capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*desired_capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -5426,7 +5390,6 @@ FLOW_HANDLE flow_create(uint32_t incoming_window_value, transfer_number next_out
|
||||
amqpvalue_destroy(incoming_window_amqp_value);
|
||||
amqpvalue_destroy(next_outgoing_id_amqp_value);
|
||||
amqpvalue_destroy(outgoing_window_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
flow_destroy(flow_instance);
|
||||
@ -6871,7 +6834,6 @@ TRANSFER_HANDLE transfer_create(handle handle_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(handle_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
transfer_destroy(transfer_instance);
|
||||
@ -8304,7 +8266,6 @@ DISPOSITION_HANDLE disposition_create(role role_value, delivery_number first_val
|
||||
|
||||
amqpvalue_destroy(role_amqp_value);
|
||||
amqpvalue_destroy(first_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
disposition_destroy(disposition_instance);
|
||||
@ -9162,7 +9123,6 @@ DETACH_HANDLE detach_create(handle handle_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(handle_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
detach_destroy(detach_instance);
|
||||
@ -10196,10 +10156,9 @@ SASL_MECHANISMS_HANDLE sasl_mechanisms_create(AMQP_VALUE sasl_server_mechanisms_
|
||||
}
|
||||
|
||||
amqpvalue_destroy(sasl_server_mechanisms_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
sasl_mechanisms_destroy(sasl_mechanisms_instance);
|
||||
sasl_mechanisms_destroy(sasl_mechanisms_instance);
|
||||
sasl_mechanisms_instance = NULL;
|
||||
}
|
||||
}
|
||||
@ -10417,22 +10376,18 @@ int sasl_mechanisms_get_sasl_server_mechanisms(SASL_MECHANISMS_HANDLE sasl_mecha
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(sasl_server_mechanisms_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*sasl_server_mechanisms_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*sasl_server_mechanisms_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*sasl_server_mechanisms_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(sasl_mechanisms_instance->composite_value, 0, *sasl_server_mechanisms_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*sasl_server_mechanisms_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -10543,7 +10498,6 @@ SASL_INIT_HANDLE sasl_init_create(const char* mechanism_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(mechanism_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
sasl_init_destroy(sasl_init_instance);
|
||||
@ -11048,7 +11002,6 @@ SASL_CHALLENGE_HANDLE sasl_challenge_create(amqp_binary challenge_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(challenge_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
sasl_challenge_destroy(sasl_challenge_instance);
|
||||
@ -11329,7 +11282,6 @@ SASL_RESPONSE_HANDLE sasl_response_create(amqp_binary response_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(response_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
sasl_response_destroy(sasl_response_instance);
|
||||
@ -11610,7 +11562,6 @@ SASL_OUTCOME_HANDLE sasl_outcome_create(sasl_code code_value)
|
||||
}
|
||||
|
||||
amqpvalue_destroy(code_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
sasl_outcome_destroy(sasl_outcome_instance);
|
||||
@ -13270,22 +13221,18 @@ int source_get_outcomes(SOURCE_HANDLE source, AMQP_VALUE* outcomes_value)
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(outcomes_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*outcomes_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*outcomes_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*outcomes_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(source_instance->composite_value, 9, *outcomes_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*outcomes_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -13417,22 +13364,18 @@ int source_get_capabilities(SOURCE_HANDLE source, AMQP_VALUE* capabilities_value
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(source_instance->composite_value, 10, *capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -14430,22 +14373,18 @@ int target_get_capabilities(TARGET_HANDLE target, AMQP_VALUE* capabilities_value
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_symbol(capabilities_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*capabilities_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*capabilities_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(target_instance->composite_value, 6, *capabilities_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*capabilities_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
@ -17213,7 +17152,6 @@ RECEIVED_HANDLE received_create(uint32_t section_number_value, uint64_t section_
|
||||
|
||||
amqpvalue_destroy(section_number_amqp_value);
|
||||
amqpvalue_destroy(section_offset_amqp_value);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
received_destroy(received_instance);
|
||||
|
||||
@ -1072,17 +1072,18 @@ AMQP_VALUE amqpvalue_create_string(const char* value)
|
||||
size_t length = strlen(value);
|
||||
size_t malloc_size = length + 1;
|
||||
|
||||
// If the result of malloc_size is zero it means it had a type overflow (size_t is an unsigned
|
||||
// type). It is very unlikely but could happen.
|
||||
// If the result of malloc_size is zero it means it had a type overflow (size_t is an unsigned type).
|
||||
// It is very unlikely but could happen.
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
LogError("Invalid string size exceeded max allocation");
|
||||
result = NULL;
|
||||
LogError("Invalid string size exceeded max allocation");
|
||||
result = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = REFCOUNT_TYPE_CREATE(AMQP_VALUE_DATA);
|
||||
result = REFCOUNT_TYPE_CREATE(AMQP_VALUE_DATA);
|
||||
}
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
/* Codes_SRS_AMQPVALUE_01_136: [If allocating the AMQP_VALUE fails then amqpvalue_create_string shall return NULL.] */
|
||||
@ -1091,7 +1092,7 @@ AMQP_VALUE amqpvalue_create_string(const char* value)
|
||||
else
|
||||
{
|
||||
result->type = AMQP_TYPE_STRING;
|
||||
result->value.string_value.chars = (char*)malloc(malloc_size);
|
||||
result->value.string_value.chars = (char*)malloc(malloc_size);
|
||||
if (result->value.string_value.chars == NULL)
|
||||
{
|
||||
/* Codes_SRS_AMQPVALUE_01_136: [If allocating the AMQP_VALUE fails then amqpvalue_create_string shall return NULL.] */
|
||||
@ -5956,13 +5957,14 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
size_t malloc_size = (size_t)internal_decoder_data->decode_to_value->value.binary_value.length + 1;
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.binary_value.bytes = NULL;
|
||||
LogError("Invalid binary_value size exceeded max allocation");
|
||||
internal_decoder_data->decode_to_value->value.binary_value.bytes = NULL;
|
||||
LogError("Invalid binary_value size exceeded max allocation");
|
||||
}
|
||||
else
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.binary_value.bytes = (unsigned char*)malloc(malloc_size);
|
||||
internal_decoder_data->decode_to_value->value.binary_value.bytes = (unsigned char*)malloc(malloc_size);
|
||||
}
|
||||
|
||||
if (internal_decoder_data->decode_to_value->value.binary_value.bytes == NULL)
|
||||
{
|
||||
/* Codes_SRS_AMQPVALUE_01_326: [If any allocation failure occurs during decoding, amqpvalue_decode_bytes shall fail and return a non-zero value.] */
|
||||
@ -6027,6 +6029,7 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.string_value.chars = (char*)malloc(malloc_size);
|
||||
}
|
||||
|
||||
if (internal_decoder_data->decode_to_value->value.string_value.chars == NULL)
|
||||
{
|
||||
/* Codes_SRS_AMQPVALUE_01_326: [If any allocation failure occurs during decoding, amqpvalue_decode_bytes shall fail and return a non-zero value.] */
|
||||
@ -6089,21 +6092,20 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
|
||||
if (internal_decoder_data->bytes_decoded == 4)
|
||||
{
|
||||
size_t malloc_size = (size_t)internal_decoder_data->decode_value_state.string_value_state.length + 1;
|
||||
size_t malloc_size = (size_t)internal_decoder_data->decode_value_state.string_value_state.length + 1;
|
||||
// If the result of malloc_size is zero it means it had a type overflow (size_t is an unsigned type).
|
||||
// It is very unlikely but could happen.
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.string_value.chars = NULL;
|
||||
LogError("Invalid string value size exceeded max allocation");
|
||||
}
|
||||
else
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.string_value.chars = (char*)malloc(malloc_size);
|
||||
}
|
||||
|
||||
// If the result of malloc_size is zero it means it had a type overflow
|
||||
// (size_t is an unsigned type). It is very unlikely but could happen.
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.string_value.chars = NULL;
|
||||
LogError("Invalid string value size exceeded max allocation");
|
||||
}
|
||||
else
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.string_value.chars = (char*)malloc(malloc_size);
|
||||
}
|
||||
if (internal_decoder_data->decode_to_value->value.string_value.chars
|
||||
== NULL)
|
||||
if (internal_decoder_data->decode_to_value->value.string_value.chars == NULL)
|
||||
{
|
||||
/* Codes_SRS_AMQPVALUE_01_326: [If any allocation failure occurs during decoding, amqpvalue_decode_bytes shall fail and return a non-zero value.] */
|
||||
internal_decoder_data->decoder_state = DECODER_STATE_ERROR;
|
||||
@ -6169,16 +6171,16 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
size--;
|
||||
|
||||
size_t malloc_size = (size_t)internal_decoder_data->decode_value_state.symbol_value_state.length + 1;
|
||||
// If the result of malloc_size is zero it means it had a type overflow
|
||||
// (size_t is an unsigned type). It is very unlikely but could happen.
|
||||
// If the result of malloc_size is zero it means it had a type overflow (size_t is an unsigned type).
|
||||
// It is very unlikely but could happen.
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = NULL;
|
||||
LogError("Invalid symbol_value size exceeded max allocation");
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = NULL;
|
||||
LogError("Invalid symbol_value size exceeded max allocation");
|
||||
}
|
||||
else
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = (char*)malloc(malloc_size);
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = (char*)malloc(malloc_size);
|
||||
}
|
||||
|
||||
if (internal_decoder_data->decode_to_value->value.symbol_value.chars == NULL)
|
||||
@ -6243,19 +6245,20 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
|
||||
if (internal_decoder_data->bytes_decoded == 4)
|
||||
{
|
||||
size_t malloc_size = (size_t)internal_decoder_data->decode_value_state.symbol_value_state.length + 1;
|
||||
// If the result of malloc_size is zero it means it had a type overflow
|
||||
// (size_t is an unsigned type). It is very unlikely but could happen.
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = NULL;
|
||||
LogError("Invalid symbol value size exceeded max allocation");
|
||||
}
|
||||
else
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = (char*)malloc(malloc_size);
|
||||
}
|
||||
if (internal_decoder_data->decode_to_value->value.symbol_value.chars == NULL)
|
||||
size_t malloc_size = (size_t)internal_decoder_data->decode_value_state.symbol_value_state.length + 1;
|
||||
// If the result of malloc_size is zero it means it had a type overflow (size_t is an unsigned type).
|
||||
// It is very unlikely but could happen.
|
||||
if (malloc_size == 0)
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = NULL;
|
||||
LogError("Invalid symbol value size exceeded max allocation");
|
||||
}
|
||||
else
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.symbol_value.chars = (char*)malloc(malloc_size);
|
||||
}
|
||||
|
||||
if (internal_decoder_data->decode_to_value->value.symbol_value.chars == NULL)
|
||||
{
|
||||
/* Codes_SRS_AMQPVALUE_01_326: [If any allocation failure occurs during decoding, amqpvalue_decode_bytes shall fail and return a non-zero value.] */
|
||||
internal_decoder_data->decoder_state = DECODER_STATE_ERROR;
|
||||
@ -6598,7 +6601,6 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
uint32_t i;
|
||||
|
||||
internal_decoder_data->decode_to_value->value.map_value.pair_count /= 2;
|
||||
|
||||
size_t malloc_size = safe_multiply_size_t(sizeof(AMQP_MAP_KEY_VALUE_PAIR), (size_t)internal_decoder_data->decode_to_value->value.map_value.pair_count);
|
||||
malloc_size = safe_multiply_size_t(malloc_size, 2);
|
||||
|
||||
@ -6611,6 +6613,7 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
{
|
||||
internal_decoder_data->decode_to_value->value.map_value.pairs = (AMQP_MAP_KEY_VALUE_PAIR*)malloc(malloc_size);
|
||||
}
|
||||
|
||||
if (internal_decoder_data->decode_to_value->value.map_value.pairs == NULL)
|
||||
{
|
||||
LogError("Could not allocate memory for map value items");
|
||||
@ -6650,16 +6653,17 @@ static int internal_decoder_decode_bytes(INTERNAL_DECODER_DATA* internal_decoder
|
||||
internal_decoder_data->decode_to_value->value.map_value.pair_count /= 2;
|
||||
size_t malloc_size = safe_multiply_size_t((size_t)internal_decoder_data->decode_to_value->value.map_value.pair_count, 2);
|
||||
malloc_size = safe_multiply_size_t(sizeof(AMQP_MAP_KEY_VALUE_PAIR), malloc_size);
|
||||
|
||||
if (internal_decoder_data->decode_to_value->value.map_value.pair_count > MAX_AMQPVALUE_ITEM_COUNT)
|
||||
{
|
||||
LogError("AMQP list map count exceeded MAX_AMQPVALUE_ITEM_COUNT");
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else if (malloc_size == SIZE_MAX)
|
||||
{
|
||||
LogError("Invalid map_value size exceeded max allocation");
|
||||
else if (malloc_size == SIZE_MAX)
|
||||
{
|
||||
LogError("Invalid map_value size exceeded max allocation");
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
}
|
||||
else if ((internal_decoder_data->decode_to_value->value.map_value.pairs =
|
||||
(AMQP_MAP_KEY_VALUE_PAIR*)malloc(malloc_size))
|
||||
== NULL)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -449,22 +449,18 @@ int <#= type_name #>_get_<#= field_name #>(<#= type_name.ToUpper() #>_HANDLE <#=
|
||||
AMQP_VALUE single_amqp_value = amqpvalue_create_<#= field.type.ToLower().Replace('-', '_').Replace(':', '_') #>(<#= field_name #>_single_value);
|
||||
if (single_amqp_value == NULL)
|
||||
{
|
||||
amqpvalue_destroy(*<#= field_name #>_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_add_array_item(*<#= field_name #>_value, single_amqp_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*<#= field_name #>_value);
|
||||
amqpvalue_destroy(single_amqp_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amqpvalue_set_composite_item(<#= type_name #>_instance->composite_value, <#= j #>, *<#= field_name #>_value) != 0)
|
||||
{
|
||||
amqpvalue_destroy(*<#= field_name #>_value);
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
else
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version: 15.0.0.0
|
||||
// Runtime Version: 17.0.0.0
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -19,8 +19,8 @@ namespace amqplib_generator
|
||||
/// Class to produce the template output
|
||||
/// </summary>
|
||||
|
||||
#line 1 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")]
|
||||
#line 1 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
|
||||
public partial class amqp_definitions_h : amqp_definitions_hBase
|
||||
{
|
||||
#line hidden
|
||||
@ -31,7 +31,7 @@ namespace amqplib_generator
|
||||
{
|
||||
this.Write("\r\n");
|
||||
|
||||
#line 8 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 8 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
amqp amqp = Program.LoadAMQPTypes();
|
||||
|
||||
#line default
|
||||
@ -55,67 +55,67 @@ extern ""C"" {
|
||||
#endif
|
||||
|
||||
#include ""azure_uamqp_c/amqpvalue.h""
|
||||
#include ""azure_c_shared_utility/umock_c_prod.h""
|
||||
#include ""umock_c/umock_c_prod.h""
|
||||
|
||||
");
|
||||
|
||||
#line 30 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 30 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
foreach (section section in amqp.Items.Where(item => item is section))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 31 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 32 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
List<type> types = new List<type>();
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 33 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
types.AddRange(section.Items.Where(item => item is type).Cast<type>());
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 34 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
foreach (type type in types)
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 35 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 36 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
string type_name = type.name.ToLower().Replace('-', '_');
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("#include \"");
|
||||
|
||||
#line 37 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 37 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture($"azure_uamqp_c/amqp_definitions_{type_name}.h"));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\"\r\n");
|
||||
|
||||
#line 38 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 38 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
#line 39 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
@ -131,7 +131,7 @@ extern ""C"" {
|
||||
/// <summary>
|
||||
/// Base class for this transformation
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
|
||||
public class amqp_definitions_hBase
|
||||
{
|
||||
#region Fields
|
||||
@ -146,7 +146,7 @@ extern ""C"" {
|
||||
/// <summary>
|
||||
/// The string builder that generation-time code is using to assemble generated output
|
||||
/// </summary>
|
||||
protected System.Text.StringBuilder GenerationEnvironment
|
||||
public System.Text.StringBuilder GenerationEnvironment
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version: 15.0.0.0
|
||||
// Runtime Version: 17.0.0.0
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -19,8 +19,8 @@ namespace amqplib_generator
|
||||
/// Class to produce the template output
|
||||
/// </summary>
|
||||
|
||||
#line 1 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")]
|
||||
#line 1 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
|
||||
public partial class amqp_definitions_type_h : amqp_definitions_type_hBase
|
||||
{
|
||||
#line hidden
|
||||
@ -31,7 +31,7 @@ namespace amqplib_generator
|
||||
{
|
||||
this.Write("\r\n");
|
||||
|
||||
#line 8 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 8 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
amqp amqp = Program.LoadAMQPTypes();
|
||||
|
||||
#line default
|
||||
@ -45,139 +45,139 @@ namespace amqplib_generator
|
||||
|
||||
");
|
||||
|
||||
#line 16 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 16 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
type type = Program.CurrentTypeObject;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 17 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
string type_name = type.name.ToLower().Replace('-', '_');
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 18 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
string amqpDefinitionName = $"AMQP_DEFINITIONS_{type_name.ToUpper()}_H";
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("#ifndef ");
|
||||
|
||||
#line 19 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 19 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(amqpDefinitionName));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n#define ");
|
||||
|
||||
#line 20 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 20 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(amqpDefinitionName));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n\r\n\r\n#ifdef __cplusplus\r\n#include <cstdint>\r\nextern \"C\" {\r\n#else\r\n#include <stdi" +
|
||||
"nt.h>\r\n#include <stdbool.h>\r\n#endif\r\n\r\n#include \"azure_uamqp_c/amqpvalue.h\"\r\n#in" +
|
||||
"clude \"azure_c_shared_utility/umock_c_prod.h\"\r\n\r\n");
|
||||
"clude \"umock_c/umock_c_prod.h\"\r\n\r\n");
|
||||
|
||||
#line 34 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 34 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if (type.@class == typeClass.composite)
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 35 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" typedef struct ");
|
||||
|
||||
#line 36 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 36 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_INSTANCE_TAG* ");
|
||||
|
||||
#line 36 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 36 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE;\r\n\r\n");
|
||||
|
||||
#line 38 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 38 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
string arg_list = Program.GetMandatoryArgListMock(type);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" MOCKABLE_FUNCTION(, ");
|
||||
|
||||
#line 39 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 39 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, ");
|
||||
|
||||
#line 39 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 39 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_create ");
|
||||
|
||||
#line 39 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 39 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(arg_list));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(");\r\n MOCKABLE_FUNCTION(, ");
|
||||
|
||||
#line 40 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 40 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, ");
|
||||
|
||||
#line 40 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 40 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_clone, ");
|
||||
|
||||
#line 40 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 40 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, value);\r\n MOCKABLE_FUNCTION(, void, ");
|
||||
|
||||
#line 41 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 41 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_destroy, ");
|
||||
|
||||
#line 41 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 41 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, ");
|
||||
|
||||
#line 41 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 41 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(");\r\n MOCKABLE_FUNCTION(, bool, is_");
|
||||
|
||||
#line 42 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 42 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
@ -185,461 +185,461 @@ namespace amqplib_generator
|
||||
this.Write("_type_by_descriptor, AMQP_VALUE, descriptor);\r\n MOCKABLE_FUNCTION(, int, amqpv" +
|
||||
"alue_get_");
|
||||
|
||||
#line 43 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 43 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", AMQP_VALUE, value, ");
|
||||
|
||||
#line 43 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 43 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE*, ");
|
||||
|
||||
#line 43 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 43 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_handle);\r\n MOCKABLE_FUNCTION(, AMQP_VALUE, amqpvalue_create_");
|
||||
|
||||
#line 44 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 44 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 44 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 44 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, ");
|
||||
|
||||
#line 44 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 44 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(");\r\n\r\n");
|
||||
|
||||
#line 46 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 46 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
foreach (field field in type.Items.Where(item => item is field))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 47 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 48 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 48 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
string field_name = field.name.ToLower().Replace('-', '_');
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 49 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
string c_type = Program.GetCType(field.type, field.multiple == "true").Replace('-', '_').Replace(':', '_');
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 50 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
type field_type = Program.GetTypeByName(field.type);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 51 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if ((field_type != null) && (field_type.@class == typeClass.composite)) c_type = field_type.name.ToUpper().Replace('-', '_').Replace(':', '_') + "_HANDLE";
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" MOCKABLE_FUNCTION(, int, ");
|
||||
|
||||
#line 52 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 52 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_get_");
|
||||
|
||||
#line 52 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 52 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(field_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 52 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 52 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, ");
|
||||
|
||||
#line 52 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 52 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 52 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 52 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(c_type));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("*, ");
|
||||
|
||||
#line 52 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 52 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(field_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_value);\r\n MOCKABLE_FUNCTION(, int, ");
|
||||
|
||||
#line 53 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 53 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_set_");
|
||||
|
||||
#line 53 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 53 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(field_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 53 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 53 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToUpper()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_HANDLE, ");
|
||||
|
||||
#line 53 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 53 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 53 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 53 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(c_type));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 53 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 53 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(field_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_value);\r\n");
|
||||
|
||||
#line 54 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 54 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n");
|
||||
|
||||
#line 56 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 56 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 57 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 57 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
else
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 58 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if (type.@class == typeClass.restricted)
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 59 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 60 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
string c_type = Program.GetCType(type.source, false).Replace('-', '_').Replace(':', '_');
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n typedef ");
|
||||
|
||||
#line 62 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 62 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(c_type));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" ");
|
||||
|
||||
#line 62 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 62 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(";\r\n\r\n");
|
||||
|
||||
#line 64 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 64 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if (c_type != "AMQP_VALUE")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 65 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 65 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" MOCKABLE_FUNCTION(, AMQP_VALUE, amqpvalue_create_");
|
||||
|
||||
#line 66 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 66 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", ");
|
||||
|
||||
#line 66 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 66 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", value);\r\n");
|
||||
|
||||
#line 67 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 67 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 68 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
else
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 69 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" MOCKABLE_FUNCTION(, AMQP_VALUE, amqpvalue_create_");
|
||||
|
||||
#line 70 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 70 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(", AMQP_VALUE, value);\r\n #define ");
|
||||
|
||||
#line 71 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 71 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_clone amqpvalue_clone\r\n #define ");
|
||||
|
||||
#line 72 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 72 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_destroy amqpvalue_destroy\r\n");
|
||||
|
||||
#line 73 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 73 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n");
|
||||
|
||||
#line 75 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 75 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if ((type.Items != null) && (type.Items.Where(item => item is descriptor).Count() > 0))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 76 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 76 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" MOCKABLE_FUNCTION(, bool, is_");
|
||||
|
||||
#line 77 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 77 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_type_by_descriptor, AMQP_VALUE, descriptor);\r\n");
|
||||
|
||||
#line 78 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 78 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n #define amqpvalue_get_");
|
||||
|
||||
#line 80 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 80 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name.ToLower()));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" amqpvalue_get_");
|
||||
|
||||
#line 80 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 80 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type.source.Replace('-', '_').Replace(':', '_')));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n\r\n");
|
||||
|
||||
#line 82 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 82 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if (type.Items != null)
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 83 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 84 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
foreach (choice choice in type.Items.Where(item => item is choice))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 85 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 86 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 86 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
if (type.@source == "symbol")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 87 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 87 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" #define ");
|
||||
|
||||
#line 88 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 88 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_");
|
||||
|
||||
#line 88 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 88 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(choice.name.Replace('-', '_').Replace(':', '_')));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" \"");
|
||||
|
||||
#line 88 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 88 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(choice.value));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\"\r\n");
|
||||
|
||||
#line 89 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 89 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 90 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 90 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
else
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 91 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 91 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" #define ");
|
||||
|
||||
#line 92 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 92 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(type_name));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("_");
|
||||
|
||||
#line 92 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 92 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(choice.name.Replace('-', '_').Replace(':', '_')));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" ");
|
||||
|
||||
#line 92 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 92 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(choice.value.Replace('-', '_').Replace(':', '_')));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n");
|
||||
|
||||
#line 93 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 93 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 94 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 95 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 95 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n");
|
||||
|
||||
#line 97 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 97 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /* ");
|
||||
|
||||
#line 103 "G:\repos\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
#line 103 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_type_h.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(amqpDefinitionName));
|
||||
|
||||
#line default
|
||||
@ -655,7 +655,7 @@ namespace amqplib_generator
|
||||
/// <summary>
|
||||
/// Base class for this transformation
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
|
||||
public class amqp_definitions_type_hBase
|
||||
{
|
||||
#region Fields
|
||||
@ -670,7 +670,7 @@ namespace amqplib_generator
|
||||
/// <summary>
|
||||
/// The string builder that generation-time code is using to assemble generated output
|
||||
/// </summary>
|
||||
protected System.Text.StringBuilder GenerationEnvironment
|
||||
public System.Text.StringBuilder GenerationEnvironment
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user