mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
do not use GST_PTR_FORMAT on pointers to types smaller than gpointer. fixes 64 bit testsuite
Original commit message from CVS: do not use GST_PTR_FORMAT on pointers to types smaller than gpointer. fixes 64 bit testsuite
This commit is contained in:
parent
4be4551a62
commit
3eefb22fdd
5 changed files with 55 additions and 10 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2005-05-02 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* docs/gst/tmpl/gstconfig.sgml:
|
||||||
|
* gst/gstconfig.h.in:
|
||||||
|
move documentation for some symbols. Add doc for GST_PTR_FORMAT
|
||||||
|
* testsuite/debug/printf_extension.c: (main):
|
||||||
|
Do not use GST_PTR_FORMAT on pointers to types with
|
||||||
|
sizeof < sizeof(gpointer). Fixes test on 64-bit
|
||||||
|
|
||||||
2005-05-02 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
2005-05-02 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
* testsuite/caps/deserialize.c: (main):
|
* testsuite/caps/deserialize.c: (main):
|
||||||
|
|
|
@ -124,14 +124,14 @@ If this is defined, the <link linkend="gstreamer-gstinfo">debugging subsystem
|
||||||
|
|
||||||
<!-- ##### MACRO GST_EXPORT ##### -->
|
<!-- ##### MACRO GST_EXPORT ##### -->
|
||||||
<para>
|
<para>
|
||||||
Under Windows it permits to export variables from a DLL, otherwise it just means extern.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO GST_PLUGIN_EXPORT ##### -->
|
<!-- ##### MACRO GST_PLUGIN_EXPORT ##### -->
|
||||||
<para>
|
<para>
|
||||||
Under Windows it permits to automatically export the plugin definition, otherwise it just defines as nothing.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,12 @@
|
||||||
@GST_DISABLE_URI_DEFINE@
|
@GST_DISABLE_URI_DEFINE@
|
||||||
|
|
||||||
/* printf extension format */
|
/* printf extension format */
|
||||||
|
/**
|
||||||
|
* GST_PTR_FORMAT:
|
||||||
|
*
|
||||||
|
* printf format type used to debug GStreamer types.
|
||||||
|
* This can only be used on types whose size is >= sizeof(gpointer).
|
||||||
|
*/
|
||||||
@GST_PRINTF_EXTENSION_FORMAT_DEFINE@
|
@GST_PRINTF_EXTENSION_FORMAT_DEFINE@
|
||||||
|
|
||||||
/* whether or not the CPU supports unaligned access */
|
/* whether or not the CPU supports unaligned access */
|
||||||
|
@ -68,6 +74,22 @@
|
||||||
# define GST_DISABLE_LOADSAVE_REGISTRY
|
# define GST_DISABLE_LOADSAVE_REGISTRY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_EXPORT:
|
||||||
|
*
|
||||||
|
* Export the given variable from the built shared object.
|
||||||
|
*
|
||||||
|
* On Windows, this exports the variable from the DLL.
|
||||||
|
* On other platforms, this gets defined to "extern".
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* GST_PLUGIN_EXPORT:
|
||||||
|
*
|
||||||
|
* Export the plugin's definition.
|
||||||
|
*
|
||||||
|
* On Windows, this exports the plugin definition from the DLL.
|
||||||
|
* On other platforms, this gets defined as a no-op.
|
||||||
|
*/
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define GST_PLUGIN_EXPORT __declspec(dllexport) extern
|
#define GST_PLUGIN_EXPORT __declspec(dllexport) extern
|
||||||
#ifdef GST_EXPORTS
|
#ifdef GST_EXPORTS
|
||||||
|
|
|
@ -23,7 +23,9 @@ main (gint argc, gchar * argv[])
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstElement *element;
|
GstElement *element;
|
||||||
G_GNUC_UNUSED int zero = 0;
|
G_GNUC_UNUSED gpointer null = NULL;
|
||||||
|
|
||||||
|
/* G_GNUC_UNUSED int zero = 0; */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -34,8 +36,13 @@ main (gint argc, gchar * argv[])
|
||||||
GST_ERROR ("This should print caps: %" GST_PTR_FORMAT, caps);
|
GST_ERROR ("This should print caps: %" GST_PTR_FORMAT, caps);
|
||||||
GST_ERROR ("This should print an object: %" GST_PTR_FORMAT, element);
|
GST_ERROR ("This should print an object: %" GST_PTR_FORMAT, element);
|
||||||
GST_ERROR ("This should print null: %" GST_PTR_FORMAT, NULL);
|
GST_ERROR ("This should print null: %" GST_PTR_FORMAT, NULL);
|
||||||
GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &zero);
|
GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &null);
|
||||||
//GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, (void *)1);
|
/* 64 bit address to a 32 bit int will cause the GObject interpretation
|
||||||
|
* to segfault; since GST_PTR_FORMAT only works on stuff with
|
||||||
|
* sizeof(gpointer) */
|
||||||
|
/* GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &zero); */
|
||||||
|
|
||||||
|
/* GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, (void *)1); */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,9 @@ main (gint argc, gchar * argv[])
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstElement *element;
|
GstElement *element;
|
||||||
G_GNUC_UNUSED int zero = 0;
|
G_GNUC_UNUSED gpointer null = NULL;
|
||||||
|
|
||||||
|
/* G_GNUC_UNUSED int zero = 0; */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -34,8 +36,13 @@ main (gint argc, gchar * argv[])
|
||||||
GST_ERROR ("This should print caps: %" GST_PTR_FORMAT, caps);
|
GST_ERROR ("This should print caps: %" GST_PTR_FORMAT, caps);
|
||||||
GST_ERROR ("This should print an object: %" GST_PTR_FORMAT, element);
|
GST_ERROR ("This should print an object: %" GST_PTR_FORMAT, element);
|
||||||
GST_ERROR ("This should print null: %" GST_PTR_FORMAT, NULL);
|
GST_ERROR ("This should print null: %" GST_PTR_FORMAT, NULL);
|
||||||
GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &zero);
|
GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &null);
|
||||||
//GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, (void *)1);
|
/* 64 bit address to a 32 bit int will cause the GObject interpretation
|
||||||
|
* to segfault; since GST_PTR_FORMAT only works on stuff with
|
||||||
|
* sizeof(gpointer) */
|
||||||
|
/* GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &zero); */
|
||||||
|
|
||||||
|
/* GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, (void *)1); */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue