[seed] Bug 722115 - %Zd is not portable



commit 32a74b581a159e965f059454c30d36775be8cc7b
Author: Ting-Wei Lan <lantw gmail com>
Date:   Tue Jan 14 11:44:03 2014 +0800

    Bug 722115 - %Zd is not portable
    
    It seems %Zd is recognized by Linux libc 5, but it is not portable. %zd should
    be used instead.

 doc/reference/tmpl/seed-exception.sgml |    2 +-
 libseed/seed-module.h                  |    2 +-
 modules/cairo/seed-cairo.h             |    2 +-
 modules/ffi/seed-ffi.c                 |    4 ++--
 modules/mpfr/seed-mpfr.c               |    4 ++--
 modules/os/seed-os.c                   |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/doc/reference/tmpl/seed-exception.sgml b/doc/reference/tmpl/seed-exception.sgml
index 55c6c38..943eb5b 100644
--- a/doc/reference/tmpl/seed-exception.sgml
+++ b/doc/reference/tmpl/seed-exception.sgml
@@ -38,7 +38,7 @@ SeedValue random_callback(SeedContext ctx,
     if(argument_count != 1)
     {
         seed_make_exception(ctx, exception, "ArgumentError",
-                            "wrong number of arguments; expected 1, got %Zd",
+                            "wrong number of arguments; expected 1, got %zd",
                             argument_count);
         return seed_make_undefined(ctx);
     }
diff --git a/libseed/seed-module.h b/libseed/seed-module.h
index e8b7fd6..f7e99fb 100644
--- a/libseed/seed-module.h
+++ b/libseed/seed-module.h
@@ -47,7 +47,7 @@
        if ( argument_count != argnum ) \
        { \
                seed_make_exception (ctx, exception, "ArgumentError", \
-                                    "wrong number of arguments; expected %s, got %Zd", \
+                                    "wrong number of arguments; expected %s, got %zd", \
                                     #argnum, argument_count); \
                return seed_make_undefined (ctx); \
        }
diff --git a/modules/cairo/seed-cairo.h b/modules/cairo/seed-cairo.h
index 719fb8f..6892e4e 100644
--- a/modules/cairo/seed-cairo.h
+++ b/modules/cairo/seed-cairo.h
@@ -4,7 +4,7 @@
 #include <cairo/cairo.h>
 
 #define EXPECTED_EXCEPTION(name, argnum)                               \
-  seed_make_exception (ctx, exception, "ArgumentError", name " expected " argnum " got %Zd", 
argument_count); \
+  seed_make_exception (ctx, exception, "ArgumentError", name " expected " argnum " got %zd", 
argument_count); \
   return seed_make_undefined (ctx);
 
 cairo_user_data_key_t *seed_get_cairo_key ();
diff --git a/modules/ffi/seed-ffi.c b/modules/ffi/seed-ffi.c
index cbf93f7..c7c2f9d 100644
--- a/modules/ffi/seed-ffi.c
+++ b/modules/ffi/seed-ffi.c
@@ -369,7 +369,7 @@ seed_ffi_function_call (SeedContext ctx,
   
   if (argument_count != priv->n_args)
     {
-      seed_make_exception (ctx, exception, "ArgumentError", "%s expected %d arguments got %Zd",
+      seed_make_exception (ctx, exception, "ArgumentError", "%s expected %d arguments got %zd",
                           priv->name, priv->n_args, argument_count);
       return seed_make_null (ctx);
     }
@@ -437,7 +437,7 @@ seed_ffi_construct_library (SeedContext ctx,
     {
       seed_make_exception (ctx, exception, 
                           "ArgumentError", 
-                          "ffi.Library constructor expects 1 argument (filename, or none to use NULL 
GModule), got %Zd", 
+                          "ffi.Library constructor expects 1 argument (filename, or none to use NULL 
GModule), got %zd", 
                           argument_count);
       return seed_make_null (ctx);
     }
diff --git a/modules/mpfr/seed-mpfr.c b/modules/mpfr/seed-mpfr.c
index 2e03126..25cd82c 100644
--- a/modules/mpfr/seed-mpfr.c
+++ b/modules/mpfr/seed-mpfr.c
@@ -612,7 +612,7 @@ seed_mpfr_construct_with_set(SeedContext ctx,
             break;
         default:
             seed_make_exception (ctx, exception, "ArgumentError",
-                                 "mpfr_t constructor.set expected 2 or 3 arguments got %Zd", argument_count);
+                                 "mpfr_t constructor.set expected 2 or 3 arguments got %zd", argument_count);
             return seed_make_undefined (ctx);
     }
 
@@ -684,7 +684,7 @@ seed_mpfr_construct(SeedContext ctx,
             break;
         default:
             seed_make_exception (ctx, exception, "ArgumentError",
-                                 "mpfr_t constructor expected 0 or 1 arguments got %Zd", argument_count);
+                                 "mpfr_t constructor expected 0 or 1 arguments got %zd", argument_count);
             return seed_make_undefined (ctx);
     }
 
diff --git a/modules/os/seed-os.c b/modules/os/seed-os.c
index 0f9dcf0..1d56c32 100644
--- a/modules/os/seed-os.c
+++ b/modules/os/seed-os.c
@@ -52,7 +52,7 @@
 SeedObject os_namespace;
 
 #define EXPECTED_EXCEPTION(name, argnum)                               \
-  seed_make_exception (ctx, exception, "ArgumentError", name " expected " argnum " got %Zd", 
argument_count); \
+  seed_make_exception (ctx, exception, "ArgumentError", name " expected " argnum " got %zd", 
argument_count); \
   return seed_make_undefined (ctx);
 
 SeedValue


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]