changed integer promotion rules; breaks bootstrapping and lots of code

This commit is contained in:
Araq 2012-07-08 21:03:47 +02:00
commit 4fbba0a65a
42 changed files with 643 additions and 261 deletions

View file

@ -16257,7 +16257,7 @@ proc COLUMN_REQUESTED_WIDTH*(column: PTreeViewColumn): int32 =
MaxWidth = column.max_width
else:
MaxWidth = column.requested_width
result = CLAMP(column.requested_width, MinWidth, MaxWidth)
result = CLAMP(column.requested_width, MinWidth, MaxWidth).int32
proc DRAW_EXPANDERS*(tree_view: PTreeView): bool =
result = (not (FLAG_SET(tree_view, TREE_VIEW_IS_LIST))) and

View file

@ -878,10 +878,10 @@ proc get_tab*(tab_array: PTabArray, tab_index: gint,
proc get_positions_in_pixels*(tab_array: PTabArray): gboolean{.cdecl,
dynlib: lib, importc: "pango_tab_array_get_positions_in_pixels".}
proc ASCENT*(rect: TRectangle): int32 =
result = - int(rect.y)
result = -rect.y
proc DESCENT*(rect: TRectangle): int32 =
result = int(rect.y) + int(rect.height)
result = (rect.y) + (rect.height)
proc LBEARING*(rect: TRectangle): int32 =
result = rect.x

View file

@ -280,9 +280,9 @@ else:
const
LibName = "libSDL.so(|.1|.0)"
const
MAJOR_VERSION* = 1'i8
MINOR_VERSION* = 2'i8
PATCHLEVEL* = 11'i8 # SDL.h constants
MAJOR_VERSION* = 1
MINOR_VERSION* = 2
PATCHLEVEL* = 11 # SDL.h constants
INIT_TIMER* = 0x00000001
INIT_AUDIO* = 0x00000010
INIT_VIDEO* = 0x00000020
@ -2523,8 +2523,8 @@ proc AllocSurface(flags: int32, width, height, depth: int,
AMask)
proc MustLock(Surface: PSurface): bool =
Result = ((surface[] .offset != 0) or
((surface[] .flags and (HWSURFACE or ASYNCBLIT or RLEACCEL)) != 0))
Result = ((surface[].offset != 0) or
((surface[].flags and (HWSURFACE or ASYNCBLIT or RLEACCEL)) != 0))
proc LockMutex(mutex: Pmutex): int =
Result = mutexP(mutex)

View file

@ -141,9 +141,9 @@ else:
const
ImageLibName = "libSDL_image.so"
const
IMAGE_MAJOR_VERSION* = 1'i8
IMAGE_MINOR_VERSION* = 2'i8
IMAGE_PATCHLEVEL* = 5'i8
IMAGE_MAJOR_VERSION* = 1
IMAGE_MINOR_VERSION* = 2
IMAGE_PATCHLEVEL* = 5
# This macro can be used to fill a version structure with the compile-time
# version of the SDL_image library.

View file

@ -161,9 +161,9 @@ else:
const
MixerLibName = "libSDL_mixer.so"
const
MAJOR_VERSION* = 1'i8
MINOR_VERSION* = 2'i8
PATCHLEVEL* = 7'i8 # Backwards compatibility
MAJOR_VERSION* = 1
MINOR_VERSION* = 2
PATCHLEVEL* = 7 # Backwards compatibility
CHANNELS* = 8 # Good default values for a PC soundcard
DEFAULT_FREQUENCY* = 22050

View file

@ -15,9 +15,9 @@ else:
const
MixerLibName = "libSDL_mixer.so"
const
MAJOR_VERSION* = 1'i8
MINOR_VERSION* = 2'i8
PATCHLEVEL* = 7'i8 # Backwards compatibility
MAJOR_VERSION* = 1
MINOR_VERSION* = 2
PATCHLEVEL* = 7 # Backwards compatibility
CHANNELS* = 8 # Good default values for a PC soundcard
DEFAULT_FREQUENCY* = 22050

View file

@ -122,9 +122,9 @@ else:
const
NetLibName = "libSDL_net.so"
const #* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *
MAJOR_VERSION* = 1'i8
MINOR_VERSION* = 2'i8
PATCHLEVEL* = 5'i8 # SDL_Net.h constants
MAJOR_VERSION* = 1
MINOR_VERSION* = 2
PATCHLEVEL* = 5 # SDL_Net.h constants
#* Resolve a host name and port to an IP address in network form.
# If the function succeeds, it will return 0.
# If the host couldn't be resolved, the host portion of the returned

View file

@ -165,9 +165,9 @@ else:
const
ttfLibName = "libSDL_ttf.so(|.1|.0)"
const
MAJOR_VERSION* = 2'i8
MINOR_VERSION* = 0'i8
PATCHLEVEL* = 8'i8 # Backwards compatibility
MAJOR_VERSION* = 2
MINOR_VERSION* = 0
PATCHLEVEL* = 8 # Backwards compatibility
STYLE_NORMAL* = 0x00000000
STYLE_BOLD* = 0x00000001

View file

@ -171,9 +171,9 @@ proc filter_deblocking*(): PFilter{.cdecl,
# SMPEG.h
#------------------------------------------------------------------------------
const
MAJOR_VERSION* = 0'i8
MINOR_VERSION* = 4'i8
PATCHLEVEL* = 2'i8
MAJOR_VERSION* = 0
MINOR_VERSION* = 4
PATCHLEVEL* = 2
type
TVersion*{.final.} = object

View file

@ -160,19 +160,20 @@ proc inflateSyncPoint*(z: PZstream): int32{.cdecl, dynlib: libz,
proc get_crc_table*(): pointer{.cdecl, dynlib: libz, importc: "get_crc_table".}
proc deflateInit(strm: var TZStream, level: int32): int32 =
result = deflateInitu(strm, level, ZLIB_VERSION(), sizeof(TZStream))
result = deflateInitu(strm, level, ZLIB_VERSION(), sizeof(TZStream).cint)
proc inflateInit(strm: var TZStream): int32 =
result = inflateInitu(strm, ZLIB_VERSION(), sizeof(TZStream))
result = inflateInitu(strm, ZLIB_VERSION(), sizeof(TZStream).cint)
proc deflateInit2(strm: var TZStream,
level, `method`, windowBits, memLevel,
strategy: int32): int32 =
result = deflateInit2u(strm, level, `method`, windowBits, memLevel,
strategy, ZLIB_VERSION(), sizeof(TZStream))
strategy, ZLIB_VERSION(), sizeof(TZStream).cint)
proc inflateInit2(strm: var TZStream, windowBits: int32): int32 =
result = inflateInit2u(strm, windowBits, ZLIB_VERSION(), sizeof(TZStream))
result = inflateInit2u(strm, windowBits, ZLIB_VERSION(),
sizeof(TZStream).cint)
proc zlibAllocMem*(AppData: Pointer, Items, Size: int): Pointer {.cdecl.} =
result = Alloc(Items * Size)