MCPcopy Create free account
hub / github.com/apache/qpid-proton / pn_is_first_in_array

Function pn_is_first_in_array

c/src/core/encoder.c:235–238  ·  view source on GitHub ↗

True if node is the first element of an array, not the descriptor. *@pre pn_is_in_array(data, parent, node) */

Source from the content-addressed store, hash-verified

233 *@pre pn_is_in_array(data, parent, node)
234 */
235static bool pn_is_first_in_array(pn_data_t *data, pni_node_t *parent, pni_node_t *node) {
236 if (!node->prev) return !parent->described; /* First node */
237 return parent->described && (!pn_data_node(data, node->prev)->prev);
238}
239
240/** True if node is in a described list - not the descriptor.
241 * - In this case we can omit trailing nulls

Callers 1

pni_encoder_enterFunction · 0.85

Calls 1

pn_data_nodeFunction · 0.85

Tested by

no test coverage detected