Skip to content
Browse files

Always write out values in little endian format. Patch from Chris Seaton

svn path=/trunk/heap-buddy/; revision=69066
  • Loading branch information...
1 parent a8a01b6 commit d46f128a108f81773b2f057dca12467760f11623 @joeshaw joeshaw committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 profiler/outfile-writer.c
View
6 profiler/outfile-writer.c
@@ -53,36 +53,42 @@ static void
write_pointer (FILE *out, gpointer x)
{
guint32 y = GPOINTER_TO_UINT (x);
+ y = GINT32_TO_LE(y);
fwrite (&y, sizeof (guint32), 1, out);
}
static void
write_int16 (FILE *out, gint16 x)
{
+ x = GINT16_TO_LE(x);
fwrite (&x, sizeof (gint16), 1, out);
}
static void
write_uint16 (FILE *out, guint16 x)
{
+ x = GUINT16_TO_LE(x);
fwrite (&x, sizeof (guint16), 1, out);
}
static void
write_int32 (FILE *out, gint32 x)
{
+ x = GINT32_TO_LE(x);
fwrite (&x, sizeof (gint32), 1, out);
}
static void
write_uint32 (FILE *out, guint32 x)
{
+ x = GUINT32_TO_LE(x);
fwrite (&x, sizeof (guint32), 1, out);
}
static void
write_int64 (FILE *out, gint64 x)
{
+ x = GINT64_TO_LE(x);
fwrite (&x, sizeof (gint64), 1, out);
}

0 comments on commit d46f128

Please sign in to comment.
Something went wrong with that request. Please try again.