- if is_optional_bool(type):
- # Special case for an optional bool. This is only here because
- # sparse does not like the "normal" case below ("warning:
- # expression using sizeof bool").
- print
- print " assert(inited);"
- print " if (datum->n >= 1) {"
- print " static const bool false_value = false;"
- print " static const bool true_value = true;"
- print
- print " row->n_%s = 1;" % columnName
- print " %s = datum->keys[0].boolean ? &true_value : &false_value;" % keyVar
- print " } else {"
- print " row->n_%s = 0;" % columnName
- print " %s = NULL;" % keyVar
- print " }"
- elif (type.n_min == 1 and type.n_max == 1) or type.is_optional_pointer():