Fixed uninitialized data in OS X and WIN32 timout functions (STR #1374).

Fixed silly but in preferences test (that was unrelated to Fl_Preferences).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5341 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-08-21 15:03:02 +00:00
parent ddfe7bb5b6
commit 555f776077
3 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,7 @@
CHANGES IN FLTK 1.1.8
- Fixed uninitialized data in OS X timout function
(STR #1374).
- Fixed uninitialized data in OS X and WIN32
timout functions (STR #1374).
- Fixed speed issues when measuring text on OS X
with Quartz (STR #1386).
- Fixed focus issues on OS X (STR #1377)

View File

@ -639,12 +639,13 @@ static void realloc_timers()
if (win32_timer_alloc == 0) {
win32_timer_alloc = 8;
}
Win32Timer* new_timers = new Win32Timer[win32_timer_alloc * 2];
memmove(new_timers, win32_timers, sizeof(Win32Timer) * win32_timer_used);
win32_timer_alloc *= 2;
Win32Timer* new_timers = new Win32Timer[win32_timer_alloc];
memset(new_timers, 0, sizeof(Win32Timer) * win32_timer_used);
memcpy(new_timers, win32_timers, sizeof(Win32Timer) * win32_timer_used);
Win32Timer* delete_me = win32_timers;
win32_timers = new_timers;
delete [] delete_me;
win32_timer_alloc *= 2;
}
static void delete_timer(Win32Timer& t)

View File

@ -22,13 +22,13 @@ decl {void writePrefs();} {public
Function {closeWindowCB( Fl_Widget*, void* )} {open private return_type void
} {
code {delete myWindow;} {}
code {Fl::delete_widget(myWindow);} {}
}
Function {saveAndCloseWindowCB( Fl_Widget*, void* )} {open private return_type void
} {
code {writePrefs();
delete myWindow;} {}
Fl::delete_widget(myWindow);} {}
}
Function {} {open return_type int