[libpeas] Do not cast pointers to unsigned integers, not 64-bit-safe
- From: Steve FrÃcinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Do not cast pointers to unsigned integers, not 64-bit-safe
- Date: Wed, 10 Aug 2011 18:28:03 +0000 (UTC)
commit d5073f3a5cf6d279849e4a2f4a9ae6c1a4c64800
Author: Steve Langasek <steve langasek canonical com>
Date: Wed Aug 10 08:37:02 2011 -0700
Do not cast pointers to unsigned integers, not 64-bit-safe
GType is an opaque pointer, not an unsigned integer, which means that when
you cast it to one, instead of using the ACTUAL RETURN TYPE THAT'S BEEN
DECLARED, you get immediate segfaults on 64-bit architectures.
https://bugzilla.gnome.org/show_bug.cgi?id=655751
libpeas/peas-extension.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libpeas/peas-extension.c b/libpeas/peas-extension.c
index 16bea52..8f98869 100644
--- a/libpeas/peas-extension.c
+++ b/libpeas/peas-extension.c
@@ -84,7 +84,7 @@ peas_extension_get_extension_type (PeasExtension *exten)
}
else
{
- return GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (exten), "peas-extension-type"));
+ return (GType) g_object_get_data (G_OBJECT (exten), "peas-extension-type");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]