[Ttssh2-commit] [7845] TTProxy,Hashtable内で正しくハッシュ値を計算できていなかったため修正

scmno****@osdn***** scmno****@osdn*****
2019年 7月 12日 (金) 00:41:20 JST


Revision: 7845
          https://osdn.net/projects/ttssh2/scm/svn/commits/7845
Author:   zmatsuo
Date:     2019-07-12 00:41:19 +0900 (Fri, 12 Jul 2019)
Log Message:
-----------
TTProxy,Hashtable内で正しくハッシュ値を計算できていなかったため修正

- r7536でエンバグ
- gcc で FARPROC が void * とマッチしないので HASHCODE.h にコンストラクタを追加
- ticket #39376

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/39376

Modified Paths:
--------------
    trunk/TTProxy/YCL/include/YCL/HASHCODE.h
    trunk/TTProxy/YCL/include/YCL/Hashtable.h
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html

-------------- next part --------------
Modified: trunk/TTProxy/YCL/include/YCL/HASHCODE.h
===================================================================
--- trunk/TTProxy/YCL/include/YCL/HASHCODE.h	2019-07-11 15:12:04 UTC (rev 7844)
+++ trunk/TTProxy/YCL/include/YCL/HASHCODE.h	2019-07-11 15:41:19 UTC (rev 7845)
@@ -27,6 +27,8 @@
 	}
 	HASHCODE(const void* value):value((int)(uintptr_t) value) {
 	}
+	HASHCODE(const FARPROC value):value((int)(uintptr_t) value) {
+	}
 	HASHCODE(int value):value(value) {
 	}
 	operator int()const {

Modified: trunk/TTProxy/YCL/include/YCL/Hashtable.h
===================================================================
--- trunk/TTProxy/YCL/include/YCL/Hashtable.h	2019-07-11 15:12:04 UTC (rev 7844)
+++ trunk/TTProxy/YCL/include/YCL/Hashtable.h	2019-07-11 15:41:19 UTC (rev 7845)
@@ -122,7 +122,7 @@
 	//	\x91S\x82ẴG\x83\x93\x83g\x83\x8A\x82\xAA\x90ݒ\xE8\x8Dς݂\xC5key\x82Ɠ\x99\x82\xB5\x82\xA2\x82\xE0\x82̂\xAA\x82Ȃ\xAF\x82\xEA\x82\xCE-1\x82\xF0\x95Ԃ\xB7\x81B
 	int find(const TYPE_KEY& key)const {
 		int found = -1;
-		int h = HASHCODE(&key);
+		int h = HASHCODE(key);
 		for (int i = 0; i < backetSize; i++) {
 			int index = ((unsigned) h + i) % backetSize;
 			const TYPE_KEY& bkey = backet[index].key;

Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2019-07-11 15:12:04 UTC (rev 7844)
+++ trunk/doc/en/html/about/history.html	2019-07-11 15:41:19 UTC (rev 7845)
@@ -42,6 +42,7 @@
     <ul>
       <li><!-- UTF-8\x8E\xF3\x90M\x8E\x9E\x81A4byte\x82\xCCUTF-8\x82̃f\x83R\x81[\x83h\x82\xF0\x8C\xEB\x82\xC1\x82Ă\xA2\x82\xBD\x82̂ŏC\x90\xB3 --></li>
       <li>The plugin compiled before 4.103 can not called because the DLL's calling convention is changed in Tera Term 4.103. </li>
+      <li><!-- TTProxy\x82\xAAOS\x82ɂ\xE6\x82\xC1\x82Đ\xB3\x82\xB5\x82\xAD\x93\xAE\x8D삵\x82Ȃ\xA2\x95s\x8B\x82\xF0\x8FC\x90\xB3\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B--></li>
       <li></li>
     </ul>
   </li>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2019-07-11 15:12:04 UTC (rev 7844)
+++ trunk/doc/ja/html/about/history.html	2019-07-11 15:41:19 UTC (rev 7845)
@@ -42,6 +42,7 @@
     <ul>
       <li>UTF-8\x8E\xF3\x90M\x8E\x9E\x81A4byte\x82\xCCUTF-8\x82̃f\x83R\x81[\x83h\x82\xF0\x8C\xEB\x82\xC1\x82Ă\xA2\x82\xBD\x82̂ŏC\x90\xB3</li>
       <li>Ver 4.103 \x82\xC5 DLL \x82̌Ăяo\x82\xB5\x8BK\x96\xF1\x82\xF0\x95ς\xA6\x82\xBD\x82\xB1\x82ƂŁA\x82\xBB\x82\xEA\x88ȑO\x82ɃR\x83\x93\x83p\x83C\x83\x8B\x82\xB3\x82ꂽ\x83v\x83\x89\x83O\x83C\x83\x93\x82\xAA\x8CĂяo\x82\xB9\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xA2\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>TTProxy\x82\xAAOS\x82ɂ\xE6\x82\xC1\x82Đ\xB3\x82\xB5\x82\xAD\x93\xAE\x8D삵\x82Ȃ\xA2\x95s\x8B\x82\xF0\x8FC\x90\xB3\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
       <li></li>
     </ul>
   </li>


Ttssh2-commit メーリングリストの案内