app/base/base-utils.h The return type of get_pid() should be gint, not
2008-09-04 Tor Lillqvist <tml@novell.com> * app/base/base-utils.h * app/base/base-utils.c: The return type of get_pid() should be gint, not GPid. This matches also the C library on Windows, in which the return type of getpid() is int, not a pointer or intptr_t. The use for GPid in the GLib API is as a "handle" to a descendant processes, returned by the g_spawn_*() functions, and passed to the g_child_watch_*() functions, not as a "process identifier". svn path=/trunk/; revision=26866
This commit is contained in:

committed by
Tor Lillqvist

parent
c68265e09c
commit
b8f94b37b3
@ -1,5 +1,14 @@
|
|||||||
2008-09-04 Tor Lillqvist <tml@novell.com>
|
2008-09-04 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* app/base/base-utils.h
|
||||||
|
* app/base/base-utils.c: The return type of get_pid() should be
|
||||||
|
gint, not GPid. This matches also the C library on Windows, in
|
||||||
|
which the return type of getpid() is int, not a pointer or
|
||||||
|
intptr_t. The use for GPid in the GLib API is as a "handle" to a
|
||||||
|
descendant processes, returned by the g_spawn_*() functions, and
|
||||||
|
passed to the g_child_watch_*() functions, not as a "process
|
||||||
|
identifier".
|
||||||
|
|
||||||
* tools/gimptool.c: Make it compile without warnings also with gcc
|
* tools/gimptool.c: Make it compile without warnings also with gcc
|
||||||
-Wwrite-strings. Use cmd.exe instead of command.com to execute the
|
-Wwrite-strings. Use cmd.exe instead of command.com to execute the
|
||||||
COPY and DEL commands on Windows.
|
COPY and DEL commands on Windows.
|
||||||
|
@ -38,10 +38,10 @@
|
|||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
GPid
|
gint
|
||||||
get_pid (void)
|
get_pid (void)
|
||||||
{
|
{
|
||||||
return getpid ();
|
return (gint) getpid ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#define __BASE_H__
|
#define __BASE_H__
|
||||||
|
|
||||||
|
|
||||||
GPid get_pid (void);
|
gint get_pid (void);
|
||||||
gint get_number_of_processors (void);
|
gint get_number_of_processors (void);
|
||||||
guint64 get_physical_memory_size (void);
|
guint64 get_physical_memory_size (void);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user