| … | … | @@ -183,13 +183,17 @@ ValuePtr LinkSignatureLink::execute(AtomSpace* as, bool silent) |
| 183 | 183 | // The _kind will usually be some LinkValue. One interesting |
| 184 | 184 | // case is the stream, which takes some Handle argument that |
| 185 | 185 | // controls the stream operation. Examples include SortedStream |
| 186 | | // and FlatStream. Pass that directly to the correct factory. |
| 186 | // and FlatStream. Those Handles are given directly to the Value |
| 187 | // factory. In order to work correctly for scratch spaces, these |
| 188 | // Atoms have to be localized to this space. |
| 187 | 189 | if (nameserver().isA(_kind, HANDLE_ARG) and 2 == _outgoing.size()) |
| 188 | | return valueserver().create(_kind, _outgoing[1]); |
| 190 | return valueserver().create(_kind, as->localize(_outgoing[1])); |
| 189 | 191 | |
| 190 | 192 | if (nameserver().isA(_kind, HANDLE_VEC_ARG) and 1 < _outgoing.size()) |
| 191 | 193 | { |
| 192 | | HandleSeq rest(_outgoing.begin() + 1, _outgoing.end()); |
| 194 | HandleSeq rest; |
| 195 | for (size_t i=1; i<_outgoing.size(); i++) |
| 196 | rest.emplace_back(as->localize(_outgoing[i])); |
| 193 | 197 | return valueserver().create(_kind, std::move(rest)); |
| 194 | 198 | } |
| 195 | 199 | |