anchor.diff:       UnpackFnName,"(ErlNifEnv *env, const ",CMsgType," *m)\n",
        "{\n",
        "    ERL_NIF_TERM res;\n",
  -     ?f("    ERL_NIF_TERM rname = ~s;\n", [mk_c_var(gpb_aa_, MsgName)]),
  +     [?f("    ERL_NIF_TERM rname = ~s;\n", [mk_c_var(gpb_aa_, MsgName)])
  +      || not Maps],
        [?f("    ERL_NIF_TERM elem~w;\n", [I]) || I <- Is],
        "\n",
        [begin
  
positive.code:      "}\n"
       "\n"].
  
  format_nif_cc_unpackers(_Mod, Defs, _Opts) ->
      CPkg = get_cc_pkg(Defs),
      [format_nif_cc_unpacker(CPkg, MsgName, Fields, Defs)
       || {{msg, MsgName}, Fields} <- Defs].
  
  format_nif_cc_unpacker(CPkg, MsgName, Fields, Defs) ->
      UnpackFnName = mk_c_fn(u_msg_, MsgName),
      CMsgType = CPkg ++ "::" ++ dot_replace_s(MsgName, "::"),
      Is = [I || {I,_} <- index_seq(Fields)],
  
negative.code:       end
        || {I, Field} <- index_seq(Fields)],
       "\n",
       if Maps ->
               [?f("    res = enif_make_new_map(env);\n"),
                [?f("    enif_make_map_put(env, res, gpb_aa_~s, elem~w, &res);\n",
                    [get_field_name(Field), I])
                 || {I, Field} <- index_seq(Fields)]];
          not Maps ->
               ?f("    res = enif_make_tuple(env, ~w, rname~s);\n",
                  [length(Fields) + 1, [?f(", elem~w",[I]) || I <- Is]])
       end,
       "    return res;\n"
       "}\n",
       "\n"].
  