(field, expr)
| 107 | |
| 108 | |
| 109 | def 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 | |
| 122 | def declaration(field): |