fix spelling
This commit is contained in:
@@ -259,15 +259,15 @@ pub struct AtomTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cold]
|
#[cold]
|
||||||
fn atom_table_base_pointer_missmatch(expected: *const u8, got: *const u8) -> ! {
|
fn atom_table_base_pointer_mismatch(expected: *const u8, got: *const u8) -> ! {
|
||||||
assert_eq!(expected, got, "Overwriting atom table base pointer, expected old value to be {expected:p}, but found {got:p}");
|
assert_eq!(expected, got, "Overwriting atom table base pointer, expected old value to be {expected:p}, but found {got:p}");
|
||||||
unreachable!("This should only be called in a case of a missmatch as such the assert_eq should have failed!")
|
unreachable!("This should only be called in a case of a mismatch as such the assert_eq should have failed!")
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for AtomTable {
|
impl Drop for AtomTable {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
if let Err(got) = set_atom_tbl_buf_base(self.block.base, ptr::null()) {
|
if let Err(got) = set_atom_tbl_buf_base(self.block.base, ptr::null()) {
|
||||||
atom_table_base_pointer_missmatch(self.block.base, got);
|
atom_table_base_pointer_mismatch(self.block.base, got);
|
||||||
}
|
}
|
||||||
self.block.deallocate();
|
self.block.deallocate();
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ impl AtomTable {
|
|||||||
|
|
||||||
if let Err(got) = set_atom_tbl_buf_base(ptr::null(), block.base) {
|
if let Err(got) = set_atom_tbl_buf_base(ptr::null(), block.base) {
|
||||||
block.deallocate();
|
block.deallocate();
|
||||||
atom_table_base_pointer_missmatch(ptr::null(), got);
|
atom_table_base_pointer_mismatch(ptr::null(), got);
|
||||||
}
|
}
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
@@ -324,7 +324,7 @@ impl AtomTable {
|
|||||||
let old_base = self.block.base;
|
let old_base = self.block.base;
|
||||||
self.block.grow();
|
self.block.grow();
|
||||||
if let Err(got) = set_atom_tbl_buf_base(old_base, self.block.base) {
|
if let Err(got) = set_atom_tbl_buf_base(old_base, self.block.base) {
|
||||||
atom_table_base_pointer_missmatch(old_base, got);
|
atom_table_base_pointer_mismatch(old_base, got);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ fn call_0() {
|
|||||||
#[should_panic(expected = "Overwriting atom table base pointer")]
|
#[should_panic(expected = "Overwriting atom table base pointer")]
|
||||||
fn atomtable_is_not_concurrency_safe() {
|
fn atomtable_is_not_concurrency_safe() {
|
||||||
// this is basically the same test as scryer_prolog::atom_table::atomtable_is_not_concurrency_safe
|
// this is basically the same test as scryer_prolog::atom_table::atomtable_is_not_concurrency_safe
|
||||||
// but for this integration test scryer_prolog is compiled with cfg!(not(test)) while for the unit test it is colpiled with cfg!(test)
|
// but for this integration test scryer_prolog is compiled with cfg!(not(test)) while for the unit test it is compiled with cfg!(test)
|
||||||
// as the atom table implementation differ between cfg!(test) and cfg!(not(test)) both test serve a pourpose
|
// as the atom table implementation differ between cfg!(test) and cfg!(not(test)) both test serve a pourpose
|
||||||
// Note: this integration test itself is compiled with cfg!(test) independent of scryer_prolog itself
|
// Note: this integration test itself is compiled with cfg!(test) independent of scryer_prolog itself
|
||||||
let _machine_a = Machine::with_test_streams();
|
let _machine_a = Machine::with_test_streams();
|
||||||
|
|||||||
Reference in New Issue
Block a user