@@ -2710,7 +2710,7 @@ static void prim_attrNames(EvalState & state, const PosIdx pos, Value * * args,
27102710 auto list = state.buildList (args[0 ]->attrs ()->size ());
27112711
27122712 for (const auto & [n, i] : enumerate(*args[0 ]->attrs ()))
2713- ( list[n] = state.allocValue ())-> mkString (state. symbols [i.name ]);
2713+ list[n] = state.symbols [i.name ]. value_ptr ( );
27142714
27152715 std::sort (list.begin (), list.end (),
27162716 [](Value * v1, Value * v2) { return strcmp (v1->c_str (), v2->c_str ()) < 0 ; });
@@ -3170,9 +3170,8 @@ static void prim_mapAttrs(EvalState & state, const PosIdx pos, Value * * args, V
31703170 auto attrs = state.buildBindings (args[1 ]->attrs ()->size ());
31713171
31723172 for (auto & i : *args[1 ]->attrs ()) {
3173- Value * vName = state.allocValue ();
3173+ Value * vName = state.symbols [i. name ]. value_ptr ();
31743174 Value * vFun2 = state.allocValue ();
3175- vName->mkString (state.symbols [i.name ]);
31763175 vFun2->mkApp (args[0 ], vName);
31773176 attrs.alloc (i.name ).mkApp (vFun2, i.value );
31783177 }
@@ -3236,8 +3235,7 @@ static void prim_zipAttrsWith(EvalState & state, const PosIdx pos, Value * * arg
32363235 auto attrs = state.buildBindings (attrsSeen.size ());
32373236
32383237 for (auto & [sym, elem] : attrsSeen) {
3239- auto name = state.allocValue ();
3240- name->mkString (state.symbols [sym]);
3238+ auto name = state.symbols [sym].value_ptr ();
32413239 auto call1 = state.allocValue ();
32423240 call1->mkApp (args[0 ], name);
32433241 auto call2 = state.allocValue ();
0 commit comments