]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix return type of w32_last_error.
authorEli Zaretskii <eliz@gnu.org>
Tue, 9 Oct 2012 18:10:16 +0000 (20:10 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 9 Oct 2012 18:10:16 +0000 (20:10 +0200)
 src/w32fns.c (w32_last_error): Change the return value to DWORD, to
 match what GetLastError returns.  Explain better why the function is
 needed.

src/ChangeLog
src/w32fns.c

index ee1057bc64dd0729802bd4c5edc64323aabc0e05..d83e3430594a087fc182a965c4a2bee23d5a4539 100644 (file)
@@ -1,5 +1,9 @@
 2012-10-09  Eli Zaretskii  <eliz@gnu.org>
 
+       * 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.
 
index ff8e5fef439c35e523c8cef2d08b9aad2b67c376..28a689ddc6c67106bffe8db9977eddf754b6eb8a 100644 (file)
@@ -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 ();