ruby-changes:14376
From: usa <ko1@a...>
Date: Thu, 31 Dec 2009 02:36:37 +0900 (JST)
Subject: [ruby-changes:14376] Ruby:r26206 (trunk): * thread_win32.c (w32_error): should report the function.
usa 2009-12-31 02:36:20 +0900 (Thu, 31 Dec 2009) New Revision: 26206 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26206 Log: * thread_win32.c (w32_error): should report the function. Modified files: trunk/ChangeLog trunk/thread_win32.c Index: thread_win32.c =================================================================== --- thread_win32.c (revision 26205) +++ thread_win32.c (revision 26206) @@ -64,7 +64,7 @@ } static void -w32_error(void) +w32_error(const char *func) { LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | @@ -74,14 +74,14 @@ GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) & lpMsgBuf, 0, NULL); - rb_bug("%s", (char*)lpMsgBuf); + rb_bug("%s: %s", func, (char*)lpMsgBuf); } static void w32_set_event(HANDLE handle) { if (SetEvent(handle) == 0) { - w32_error(); + w32_error("w32_set_event"); } } @@ -89,7 +89,7 @@ w32_reset_event(HANDLE handle) { if (ResetEvent(handle) == 0) { - w32_error(); + w32_error("w32_reset_event"); } } @@ -156,7 +156,7 @@ w32_close_handle(HANDLE handle) { if (CloseHandle(handle) == 0) { - w32_error(); + w32_error("w32_close_handle"); } } @@ -164,7 +164,7 @@ w32_resume_thread(HANDLE handle) { if (ResumeThread(handle) == -1) { - w32_error(); + w32_error("w32_resume_thread"); } } @@ -318,7 +318,7 @@ #if USE_WIN32_MUTEX *lock = CreateMutex(NULL, FALSE, NULL); if (*lock == NULL) { - w32_error(); + w32_error("native_mutex_initialize"); } /* thread_debug("initialize mutex: %p\n", *lock); */ #else Index: ChangeLog =================================================================== --- ChangeLog (revision 26205) +++ ChangeLog (revision 26206) @@ -1,3 +1,7 @@ +Thu Dec 31 02:35:57 2009 NAKAMURA Usaku <usa@r...> + + * thread_win32.c (w32_error): should report the function. + Thu Dec 31 01:58:47 2009 Nobuyoshi Nakada <nobu@r...> * ext/extmk.rb: fix for extstatic. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/