some improvements to gmodule-win32 and gthread-win32
- From: carpentier benoît <gtkool_2kx yahoo fr>
- To: gtk-devel-list gnome org
- Subject: some improvements to gmodule-win32 and gthread-win32
- Date: Wed, 12 May 2004 21:38:05 +0200 (CEST)
Hello,
Here are maybe some improvements to gmodule-win32.c
Lines 112 & 113 should be more easily be understood,
if
replaced by :
if (kernel32 == NULL && ((kernel32 = (HMODULE)
GetModuleHandle ("kernel32.dll")) == NULL) return
NULL;
Line 130, adding a cast here (gpointer) should be
interesting ?
if ((p = (gpointer) GetProcAddress (me32.hModule,
symbol_name)) != NULL)
Also the same for line 158 : casting with HMODULE
if ((psapi = (HMODULE) LoadLibrary ("psapi.dll")) ==
NULL)
Line 170, again a casting is maybe needed ?
modules = (HMODULE *) g_malloc (size);
Lines 211, 214, adding a cast (gpointer) also.
in file gthread-win32.c :
in g_thread_impl_init () :
is it useful to have :
static gboolean beenhere = FALSE;
...
if (beenhere)
return;
beenhere = TRUE;
why not having initialiszd beenhere to TRUE directly ?
I propose again a casting, for line 576.
kernel32 = (HMODULE) GetModuleHandle ("KERNEL32.DLL");
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]