Ignore:
Timestamp:
Mar 21, 2007, 7:06:34 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

Variant, VBObjectの追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/basic/function.sbp

    r170 r175  
    10861086End Function
    10871087
     1088Function _System_HashFromPtr(p As VoidPtr) As Long
     1089#ifdef _WIN64
     1090    Dim qw = p As QWord
     1091    Return (HIDWORD(qw) Xor LODWORD(qw)) As Long
     1092#else
     1093    Return p As Long
     1094#endif
     1095End Function
     1096
    10881097'--------
    10891098' 文字列関数その2
     
    11831192End Function
    11841193
     1194Function _System_GetHashFromWordArray(p As *Word, n As SIZE_T) As Long
     1195    Dim hash = 0 As DWord
     1196    Dim i As Long
     1197    For i = 0 To ELM(n)
     1198        hash = ((hash << 16) + p[i]) Mod &h7fffffff
     1199    Next
     1200    _System_GetHashFromWordArray = hash As Long
     1201End Function
     1202
    11851203#endif '_INC_FUNCTION
Note: See TracChangeset for help on using the changeset viewer.