[Swfdec] libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h

Benjamin Otte company at kemper.freedesktop.org
Wed Jan 9 03:51:23 PST 2008


 libswfdec/swfdec_buffer.c |    8 ++++----
 libswfdec/swfdec_buffer.h |   12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit a2a0afa0e612f1935dabd909890c32be92ab5e18
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Jan 9 12:46:43 2008 +0100

    make Buffer.size a gsize instead of a guint
    
    This should fix various implicit casting problems and related gcc warnings.

diff --git a/libswfdec/swfdec_buffer.c b/libswfdec/swfdec_buffer.c
index 3f15975..3420d10 100644
--- a/libswfdec/swfdec_buffer.c
+++ b/libswfdec/swfdec_buffer.c
@@ -114,7 +114,7 @@ swfdec_buffer_new (void)
  * Returns: a new #SwfdecBuffer with buffer->data pointing to new data
  **/
 SwfdecBuffer *
-swfdec_buffer_new_and_alloc (guint size)
+swfdec_buffer_new_and_alloc (gsize size)
 {
   SwfdecBuffer *buffer = swfdec_buffer_new ();
 
@@ -135,7 +135,7 @@ swfdec_buffer_new_and_alloc (guint size)
  * Returns: a new #SwfdecBuffer with buffer->data pointing to new data
  **/
 SwfdecBuffer *
-swfdec_buffer_new_and_alloc0 (guint size)
+swfdec_buffer_new_and_alloc0 (gsize size)
 {
   SwfdecBuffer *buffer = swfdec_buffer_new ();
 
@@ -156,7 +156,7 @@ swfdec_buffer_new_and_alloc0 (guint size)
  * Returns: a new #SwfdecBuffer pointing to @data
  **/
 SwfdecBuffer *
-swfdec_buffer_new_for_data (unsigned char *data, guint size)
+swfdec_buffer_new_for_data (unsigned char *data, gsize size)
 {
   SwfdecBuffer *buffer;
   
@@ -189,7 +189,7 @@ swfdec_buffer_free_subbuffer (unsigned char *data, gpointer priv)
  * Returns: a new #SwfdecBuffer managing the indicated region.
  **/
 SwfdecBuffer *
-swfdec_buffer_new_subbuffer (SwfdecBuffer * buffer, guint offset, guint length)
+swfdec_buffer_new_subbuffer (SwfdecBuffer * buffer, gsize offset, gsize length)
 {
   SwfdecBuffer *subbuffer;
   
diff --git a/libswfdec/swfdec_buffer.h b/libswfdec/swfdec_buffer.h
index 717a295..248f425 100644
--- a/libswfdec/swfdec_buffer.h
+++ b/libswfdec/swfdec_buffer.h
@@ -33,7 +33,7 @@ typedef void (* SwfdecBufferFreeFunc) (unsigned char *data, gpointer priv);
 struct _SwfdecBuffer
 {
   unsigned char *	data;		/* memory region (consider as read only) */
-  guint			length;		/* length of the memory region pointer do by @data */
+  gsize			length;		/* length of the memory region pointer do by @data */
 
   /*< private >*/
   int			ref_count;	/* guess */
@@ -59,11 +59,11 @@ struct _SwfdecBufferQueue
 GType swfdec_buffer_queue_get_type  (void);
 
 SwfdecBuffer *swfdec_buffer_new (void);
-SwfdecBuffer *swfdec_buffer_new_and_alloc (guint size);
-SwfdecBuffer *swfdec_buffer_new_and_alloc0 (guint size);
-SwfdecBuffer *swfdec_buffer_new_for_data (unsigned char *data, guint size);
-SwfdecBuffer *swfdec_buffer_new_subbuffer (SwfdecBuffer * buffer, guint offset,
-    guint length);
+SwfdecBuffer *swfdec_buffer_new_and_alloc (gsize size);
+SwfdecBuffer *swfdec_buffer_new_and_alloc0 (gsize size);
+SwfdecBuffer *swfdec_buffer_new_for_data (unsigned char *data, gsize size);
+SwfdecBuffer *swfdec_buffer_new_subbuffer (SwfdecBuffer * buffer, gsize offset,
+    gsize length);
 SwfdecBuffer *swfdec_buffer_new_from_file (const char *filename, GError **error);
 SwfdecBuffer *swfdec_buffer_ref (SwfdecBuffer * buffer);
 SwfdecBuffer *swfdec_buffer_get_super (SwfdecBuffer *buffer);


More information about the Swfdec mailing list