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:
Tor Lillqvist 2008-09-04 17:54:06 +00:00 committed by Tor Lillqvist
parent c68265e09c
commit b8f94b37b3
3 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,14 @@
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
-Wwrite-strings. Use cmd.exe instead of command.com to execute the
COPY and DEL commands on Windows.

View File

@ -38,10 +38,10 @@
/* public functions */
GPid
gint
get_pid (void)
{
return getpid ();
return (gint) getpid ();
}
gint

View File

@ -20,7 +20,7 @@
#define __BASE_H__
GPid get_pid (void);
gint get_pid (void);
gint get_number_of_processors (void);
guint64 get_physical_memory_size (void);