Author Topic: Hash Fix  (Read 19773 times)

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Hash Fix
« 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: [Select]
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$