ScriptBasic
May 22, 2012, 02:31:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Registration Disabled Send an e-mail to support @ scriptbasic.org to request a membership to this forum. (include desired forum name)
 
   Home   Wiki Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Hash Fix  (Read 242 times)
support
Administrator
*****
Posts: 409


« on: October 12, 2011, 10:31:08 AM »

I was testing the HASH extension module on my Ubuntu 64 system and noticed it had the old out of memory error when calling the ThisValue() function. I have attached the interface.c that was fixed by AIR.

Code:
IMPORT hash.bas

h = hash::New()
hash::SetValue(h,"A1234567890",1)
hash::SetValue(h,"B12345678901234567890",2)
hash::SetValue(h,"C123456789012345678901234567890",3)
hash::Start(h)

FOR x = 1 to 3
  PRINT hash::ThisKey(h), " - "
  PRINT hash::ThisValue(h),"\n"
  hash::Next(h)
NEXT x

hash::Release(h)

jrs@laptop:~/sb/test$ scriba testhash.sb
A1234567890 - 1
B12345678901234567890 - 2
C123456789012345678901234567890 - 3
jrs@laptop:~/sb/test$

* hash.tar.z (3.84 KB - downloaded 14 times.)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!