• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Ruby GTK3移行後のメインリポジトリ


Commit MetaInfo

修訂6adcb45c6ee5f60c0cf1f36bfc01d36a990ed548 (tree)
時間2016-02-02 22:47:08
作者Shyouzou Sugitani <shy@user...>
CommiterShyouzou Sugitani

Log Message

update test-kawari8.rb

Change Summary

差異

--- a/test/test-kawari8.rb
+++ b/test/test-kawari8.rb
@@ -11,9 +11,20 @@ end
1111
1212 path = ARGV[0].to_s.encode("Shift_JIS")
1313 #print path, "\n"
14-Test.load(path, path.bytesize)
14+path_ptr = Fiddle::Pointer.malloc(
15+ path.bytesize + 1,
16+ freefunc=nil # Kawari8 will free this pointer
17+)
18+Test.load(path_ptr, path.bytesize)
1519 test_text = "NOTIFY SHIORI/3.0\r\nCharset: Shift_JIS\r\nID: TEST 日本語\r\n\r\n".encode("Shift_JIS")
16-test_len = [test_text.bytesize].pack("q")
17-result = Test.request(test_text, test_len)
18-print result.to_s.force_encoding("Shift_JIS").encode("UTF-8")
20+test_len = [test_text.bytesize].pack("l!")
21+test_ptr = Fiddle::Pointer.malloc(
22+ test_text.bytesize + 1,
23+ freefunc=nil # Kawari8 will free this pointer
24+)
25+test_ptr[0, test_text.bytesize] = test_text
26+result = Test.request(test_ptr, test_len)
27+test_len, = test_len.unpack("l!")
28+#print result.methods.sort, "\n"
29+print result[0, test_len].to_s.force_encoding("Shift_JIS").encode("UTF-8")
1930 Test.unload()