Changeset 370 for trunk


Ignore:
Timestamp:
Nov 3, 2007, 5:18:30 PM (17 years ago)
Author:
dai
Message:

System.GCクラスを追加。
64ビットコンパイラで生じる警告を改修した。

Location:
trunk/Include
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/ActiveBasic/Strings/Strings.ab

    r355 r370  
    9393    ChrCmp = ChrCmp(s1, s2, System.Math.Min(size1, size2))
    9494    If ChrCmp = 0 Then
    95         ChrCmp = size1 - size2
     95        ChrCmp = ( size1 - size2 ) As Long
    9696    End If
    9797End Function
     
    100100    ChrCmp = ChrCmp(s1, s2, System.Math.Min(size1, size2))
    101101    If ChrCmp = 0 Then
    102         ChrCmp = size1 - size2
     102        ChrCmp = ( size1 - size2 ) As Long
    103103    End If
    104104End Function
  • trunk/Include/Classes/System/DateTime.ab

    r275 r370  
    253253                - Millisecond * TimeSpan.TicksPerMillisecond As Int64
    254254        If IsLeapYear(Year + Int(value)) Then
    255             ticks += (value - Int(value)) * 366 * TimeSpan.TicksPerDay
    256         Else
    257             ticks += (value - Int(value)) * 365 * TimeSpan.TicksPerDay
     255            ticks += ( (value - Int(value)) * 366 * TimeSpan.TicksPerDay ) As Int64
     256        Else
     257            ticks += ( (value - Int(value)) * 365 * TimeSpan.TicksPerDay ) As Int64
    258258        End If
    259259        Return date.AddTicks(ticks)
  • trunk/Include/Classes/System/Drawing/Color.ab

    r335 r370  
    131131        Dim max = System.Math.Max(System.Math.Max(r, g), b) As Long
    132132        Dim min = System.Math.Min(System.Math.Min(r, g), b) As Long
    133         Return (max - min) / max
     133        Return ( (max - min) / max ) As Single
    134134    End Function
    135135
     
    139139        Dim b = B
    140140        Dim max = System.Math.Max(System.Math.Max(r, g), b)
    141         Return max * (1 / 255)
     141        Return ( max * (1 / 255) ) As Single
    142142    End Function
    143143
  • trunk/Include/Classes/System/String.ab

    r366 r370  
    361361    Private
    362362        Const Function indexOfCore(c As StrChar, start As Long, count As Long) As Long
    363             indexOfCore = ActiveBasic.Strings.ChrFind(VarPtr(Chars[start]), count, c)
     363            indexOfCore = ActiveBasic.Strings.ChrFind(VarPtr(Chars[start]), count, c) As Long
    364364            If indexOfCore <> -1 Then
    365365                indexOfCore += start
  • trunk/Include/Classes/System/Text/StringBuilder.ab

    r288 r370  
    407407        Dim curPos = 0 As Long
    408408        Do
    409             Dim nextPos = ActiveBasic.Strings.ChrFind(VarPtr(chars[curPos]) As *StrChar, size As SIZE_T, StrPtr(oldStr), oldStr.Length As SIZE_T)
     409            Dim nextPos = ActiveBasic.Strings.ChrFind(VarPtr(chars[curPos]) As *StrChar, size As SIZE_T, StrPtr(oldStr), oldStr.Length As SIZE_T) As Long
    410410            If nextPos = -1 As SIZE_T Then
    411411                Exit Sub
  • trunk/Include/Classes/index.ab

    r355 r370  
    1111#require "./System/Delegate.ab"
    1212#require "./System/Environment.ab"
     13#require "./System/GC.ab"
    1314#require "./System/Math.ab"
    1415#require "./System/misc.ab"
  • trunk/Include/system/gc.sbp

    r369 r370  
    2525Type _System_MemoryObject
    2626    ptr As VoidPtr
    27     size As Long
     27    size As SIZE_T
    2828    flags As DWord
    2929    generationCount As Long
  • trunk/Include/system/string.sbp

    r303 r370  
    3939Function GetStr(psz As PSTR, len As SIZE_T, ByRef wcs As PWSTR) As SIZE_T
    4040    If psz = 0 Then Return 0
    41     Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, 0, 0)
     41    Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len As Long, 0, 0)
    4242    wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * (lenWCS + 1)) As PWSTR
    43     GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, lenWCS)
     43    GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len As Long, wcs, lenWCS)
    4444    wcs[GetStr] = 0
    4545End Function
     
    7373Function GetStr(psz As PWSTR, len As SIZE_T, ByRef mbs As PSTR) As SIZE_T
    7474    If psz = 0 Then Return 0
    75     Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, 0, 0, 0, 0)
     75    Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len As Long, 0, 0, 0, 0)
    7676    mbs = _System_AllocForConvertedString(SizeOf (SByte) * (lenMBS + 1)) As PSTR
    77     GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, mbs, lenMBS, 0, 0) As SIZE_T
     77    GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len As Long, mbs, lenMBS, 0, 0) As SIZE_T
    7878    mbs[GetStr] = 0
    7979End Function
Note: See TracChangeset for help on using the changeset viewer.