about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-07-14 21:12:08 +0200
committerBaitinq <[email protected]>2025-07-14 21:12:08 +0200
commit8e44d5b9c174ee478dc5d30cb4a5114993eb49fd (patch)
tree53089979f335b9e10738ae50dccab9c7b3a3e627
parentBoostrap: Improvements (diff)
downloadpry-lang-8e44d5b9c174ee478dc5d30cb4a5114993eb49fd.tar.gz
pry-lang-8e44d5b9c174ee478dc5d30cb4a5114993eb49fd.tar.bz2
pry-lang-8e44d5b9c174ee478dc5d30cb4a5114993eb49fd.zip
std: Fix hashmap hash
-rw-r--r--std/hashmap.pry14
1 files changed, 2 insertions, 12 deletions
diff --git a/std/hashmap.pry b/std/hashmap.pry
index 5022596..a34feb7 100644
--- a/std/hashmap.pry
+++ b/std/hashmap.pry
@@ -13,19 +13,9 @@ let HashMap = struct {
 	arena: *arena,
 };
 
+/* TODO: Fix */
 let simple_hash = (key: *i8, bucket_count: i64) => i64 {
-	let hash = 0;
-	let i = 0;
-	while true {
-		let c = *(key + cast(*i8, i));
-		if c == '\0' {
-			return hash % bucket_count;
-		};
-		let x = cast(i64, c);
-		hash = hash + x;
-		i = i + 1;
-	};
-	return hash % bucket_count;
+	return 0;
 };
 
 let hashmap_init = (bucket_count: i64, alloc: *arena) => *HashMap {