From: Eli Zaretskii Date: Tue, 9 Oct 2012 18:10:16 +0000 (+0200) Subject: Fix return type of w32_last_error. X-Git-Tag: emacs-24.2.90~237^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b15736e6e33a52021a2a91b0b3360cd5a9803405;p=emacs.git Fix return type of w32_last_error. src/w32fns.c (w32_last_error): Change the return value to DWORD, to match what GetLastError returns. Explain better why the function is needed. --- diff --git a/src/ChangeLog b/src/ChangeLog index ee1057bc64d..d83e3430594 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2012-10-09 Eli Zaretskii + * w32fns.c (w32_last_error): Change the return value to DWORD, to + match what GetLastError returns. Explain why the function is + needed. + * frame.c (delete_frame): Rename local variable 'tooltip_frame' to 'is_tooltip_frame', to avoid confusion with its global namesake. diff --git a/src/w32fns.c b/src/w32fns.c index ff8e5fef439..28a689ddc6c 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -6983,8 +6983,10 @@ w32_strerror (int error_no) return buf; } -/* For convenience when debugging. */ -int +/* For convenience when debugging. (You cannot call GetLastError + directly from GDB: it will crash, because it uses the __stdcall + calling convention, not the _cdecl convention assumed by GDB.) */ +DWORD w32_last_error (void) { return GetLastError ();