lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [3/3] lucy-clownfish git commit: Fix StupidHashString constructor
Date Fri, 17 Apr 2015 19:04:06 GMT
Fix StupidHashString constructor

Make the StupidHashString constructor actually return a StupidHashString.
If a String is returned, the overridden Hash_Sum method won't be called.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/9fea2c92
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/9fea2c92
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/9fea2c92

Branch: refs/heads/master
Commit: 9fea2c92cb4760003d600650495bf341b1db4cd0
Parents: 9beae4d
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Fri Apr 17 21:00:12 2015 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Fri Apr 17 21:00:12 2015 +0200

----------------------------------------------------------------------
 runtime/core/Clownfish/Test/TestLockFreeRegistry.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/9fea2c92/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestLockFreeRegistry.c b/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
index 5f5855c..1acc1ed 100644
--- a/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
+++ b/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
@@ -33,7 +33,10 @@ TestLFReg_new() {
 
 StupidHashString*
 StupidHashString_new(const char *text) {
-    return (StupidHashString*)Str_new_from_utf8(text, strlen(text));
+    StupidHashString *self
+        = (StupidHashString*)Class_Make_Obj(STUPIDHASHSTRING);
+    return (StupidHashString*)Str_init_from_trusted_utf8((String*)self, text,
+                                                         strlen(text));
 }
 
 int32_t


Mime
View raw message