]> Repositorios git - scryer-prolog.git/commitdiff
update prolog_parser version, correct atom_chars/2 (#379)
authorMark Thom <[email protected]>
Fri, 5 Jun 2020 05:23:49 +0000 (23:23 -0600)
committerMark Thom <[email protected]>
Fri, 5 Jun 2020 05:23:49 +0000 (23:23 -0600)
Cargo.lock
Cargo.toml
src/prolog/machine/system_calls.rs

index 0f0b861695a6d5453a3aa44d9d45692053e39490..2c0a3d0bf39577c2821a8f7352236592fb1ef02e 100644 (file)
@@ -634,9 +634,7 @@ dependencies = [
 
 [[package]]
 name = "prolog_parser"
-version = "0.8.59"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "029a4682cf40923b8eb05c4b943d1d6be73775e7bf80bcb0866b5ef29abb0802"
+version = "0.8.60"
 dependencies = [
  "lexical",
  "num-rug-adapter",
index 8b8df0faeb01bfed2bdf76b9d87eb5828d44fc5b..a185647781b84af631dd8eddb578d212b8178b35 100644 (file)
@@ -32,7 +32,7 @@ libc = "0.2.62"
 nix = "0.15.0"
 num-rug-adapter = { optional = true, version = "0.1.3" }
 ordered-float = "0.5.0"
-prolog_parser = { version = "0.8.59", default-features = false }
+prolog_parser = { version = "0.8.60", default-features = false }
 ref_thread_local = "0.0.0"
 rug = { version = "1.4.0", optional = true }
 rustyline = "6.0.0"
index d731e4254af3a370761aae5da5866a8e6ab52b56..5a4523ce4cf5a2ded2a0eebf259cfa77f48960b9 100644 (file)
@@ -830,19 +830,10 @@ impl MachineState {
                     }
                     Addr::Con(h) if self.heap.atom_at(h) => {
                            if let HeapCellValue::Atom(name, _) = self.heap.clone(h) {
-                            let iter = name.as_str().chars().map(|c| Addr::Char(c));
-                            let list_of_chars = Addr::HeapCell(self.heap.to_list(iter));
-
+                            let s  = self.heap.put_complete_string(name.as_str());
                             let a2 = self[temp_v!(2)];
 
-                            match self.store(self.deref(a2)) {
-                                Addr::PStrLocation(..) => {
-                                    self.fail = true;
-                                }
-                                a2 => {
-                                    self.unify(a2, list_of_chars);
-                                }
-                            }
+                            self.unify(s, a2);
                         } else {
                             unreachable!()
                         }