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

Function fconstruct

c/src/protocol.py:109–119  ·  view source on GitHub ↗
(field, expr)

Source from the content-addressed store, hash-verified

107
108
109def fconstruct(field, expr):
110 type = ftype(field)
111 if type in CONSTRUCTORS:
112 result = "pn_%s(mem, %s)" % (CONSTRUCTORS[type], expr)
113 if type in NULLABLE:
114 result = "%s ? %s : NULL" % (expr, result)
115 else:
116 result = expr
117 if multi(field):
118 result = "pn_box(mem, pn_boolean(mem, true), %s)" % result
119 return result
120
121
122def declaration(field):

Callers

nothing calls this directly

Calls 2

ftypeFunction · 0.85
multiFunction · 0.85

Tested by

no test coverage detected