[svn:parrot] r38107 - in trunk: config/gen config/gen/platform/generic lib/Parrot/Pmc2c/PMC src src/pmc src/string/charset src/string/encoding

coke at svn.parrot.org coke at svn.parrot.org
Tue Apr 14 23:41:34 UTC 2009


Author: coke
Date: Tue Apr 14 23:41:32 2009
New Revision: 38107
URL: https://trac.parrot.org/parrot/changeset/38107

Log:
[cage] reduce -unused-parameter warnings (*)

(*) - not enabled by default (yet)

Modified:
   trunk/config/gen/opengl.pm
   trunk/config/gen/platform/generic/itimer.c
   trunk/config/gen/platform/generic/stat.c
   trunk/lib/Parrot/Pmc2c/PMC/Null.pm
   trunk/lib/Parrot/Pmc2c/PMC/default.pm
   trunk/src/debug.c
   trunk/src/embed.c
   trunk/src/misc.c
   trunk/src/pbc_info.c
   trunk/src/pmc/bigint.pmc
   trunk/src/pmc/class.pmc
   trunk/src/pmc/continuation.pmc
   trunk/src/pmc/cpointer.pmc
   trunk/src/pmc/default.pmc
   trunk/src/pmc/hash.pmc
   trunk/src/pmc/key.pmc
   trunk/src/pmc/null.pmc
   trunk/src/pmc/parrotinterpreter.pmc
   trunk/src/pmc/retcontinuation.pmc
   trunk/src/pmc/sub.pmc
   trunk/src/scheduler.c
   trunk/src/string/charset/unicode.c
   trunk/src/string/encoding/ucs2.c
   trunk/src/string/encoding/utf8.c
   trunk/src/thread.c

Modified: trunk/config/gen/opengl.pm
==============================================================================
--- trunk/config/gen/opengl.pm	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/config/gen/opengl.pm	Tue Apr 14 23:41:32 2009	(r38107)
@@ -1006,7 +1006,7 @@
 /* Make sure that interp and sub are sane before running callback sub */
 /* XXXX: Should this do the moral equivalent of PANIC? */
 int
-is_safe(PARROT_INTERP, PMC *sub)
+is_safe(SHIM_INTERP, PMC *sub)
 {
     /* XXXX: Verify that interp still exists */
 

Modified: trunk/config/gen/platform/generic/itimer.c
==============================================================================
--- trunk/config/gen/platform/generic/itimer.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/config/gen/platform/generic/itimer.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -38,7 +38,7 @@
 */
 
 void
-start_sys_timer_ms(void *handle, int ms)
+start_sys_timer_ms(SHIM(void *handle), int ms)
 {
     struct itimerval its;
     memset(&its, 0, sizeof (its));

Modified: trunk/config/gen/platform/generic/stat.c
==============================================================================
--- trunk/config/gen/platform/generic/stat.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/config/gen/platform/generic/stat.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -31,7 +31,7 @@
 */
 
 PMC *
-Parrot_stat_file(PARROT_INTERP, STRING *filename)
+Parrot_stat_file(SHIM_INTERP, SHIM(STRING *filename))
 {
     return NULL;
 }
@@ -46,7 +46,7 @@
 */
 
 PMC *
-Parrot_stat_info_pmc(PARROT_INTERP, STRING *filename, INTVAL thing)
+Parrot_stat_info_pmc(SHIM_INTERP, SHIM(STRING *filename), SHIM(INTVAL thing))
 {
     return NULL;
 }
@@ -189,7 +189,7 @@
 */
 
 FLOATVAL
-Parrot_stat_info_floatval(PARROT_INTERP, STRING *filename, INTVAL thing)
+Parrot_stat_info_floatval(SHIM_INTERP, SHIM(STRING *filename), SHIM(INTVAL thing))
 {
     return (FLOATVAL)-1;
 }
@@ -204,7 +204,7 @@
 */
 
 STRING *
-Parrot_stat_info_string(PARROT_INTERP, STRING *filename, INTVAL thing)
+Parrot_stat_info_string(SHIM_INTERP, SHIM(STRING *filename), SHIM(INTVAL thing))
 {
     return NULL;
 }

Modified: trunk/lib/Parrot/Pmc2c/PMC/Null.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/Null.pm	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/lib/Parrot/Pmc2c/PMC/Null.pm	Tue Apr 14 23:41:32 2009	(r38107)
@@ -36,12 +36,24 @@
             }
         );
 
-        # don't return anything, ever
-        my $output = <<"EOC";
+        # take care to mark the parameters as unused
+        # to avoid compiler warnings
+        my $body = <<"EOC";
+    UNUSED(interp)
+    UNUSED(pmc)
+EOC
+
+        foreach my $param (split /,\s*/, $method->parameters) {
+            $param =~ s/.*\b(\w+)/$1/;
+            $body .= "    UNUSED($param)\n";
+        }
+        $body .= <<"EOC";
+
     Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NULL_REG_ACCESS,
         "Null PMC access in $vt_method_name()");
 EOC
-        $new_default_method->body( Parrot::Pmc2c::Emitter->text($output) );
+
+        $new_default_method->body( Parrot::Pmc2c::Emitter->text($body) );
         $self->add_method($new_default_method);
     }
     return 1;

Modified: trunk/lib/Parrot/Pmc2c/PMC/default.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/default.pm	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/lib/Parrot/Pmc2c/PMC/default.pm	Tue Apr 14 23:41:32 2009	(r38107)
@@ -32,12 +32,18 @@
                 type        => Parrot::Pmc2c::Method::VTABLE,
             }
         );
-
         my $ret = return_statement($method);
-        $new_default_method->body( Parrot::Pmc2c::Emitter->text(<<"EOC") );
-    cant_do_method(interp, pmc, "$vt_method_name");
-    $ret
-EOC
+
+        # take care to mark the parameters as unused
+        # to avoid compiler warnings
+        my $body;
+        foreach my $param (split /,\s*/, $method->parameters) {
+            $param =~ s/.*\b(\w+)/$1/;
+            $body .= "    UNUSED($param)\n";
+        }
+        $body .= qq{    cant_do_method(interp, pmc, "$vt_method_name");\n};
+
+        $new_default_method->body( Parrot::Pmc2c::Emitter->text($body));
         $self->add_method($new_default_method);
     }
     return 1;

Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/debug.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -308,7 +308,7 @@
     PDB_list(pdb->debugee, cmd);
 }
 
-static void dbg_listbreakpoints(PDB_t * pdb, const char * cmd) /* HEADERIZER SKIP */
+static void dbg_listbreakpoints(PDB_t * pdb, SHIM(const char * cmd)) /* HEADERIZER SKIP */
 {
     TRACEDEB_MSG("dbg_list");
 

Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/embed.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -1158,7 +1158,7 @@
 
 PARROT_EXPORT
 void
-Parrot_disassemble(PARROT_INTERP, const char *outfile, Parrot_disassemble_options options)
+Parrot_disassemble(PARROT_INTERP, SHIM(const char *outfile), Parrot_disassemble_options options)
 {
     PDB_line_t *line;
     PDB_t      *pdb             = mem_allocate_zeroed_typed(PDB_t);

Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/misc.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -252,7 +252,8 @@
 
 PARROT_EXPORT
 int
-Parrot_secret_snprintf(ARGOUT(char *buffer), const size_t len, ARGIN(const char *format), ...)
+Parrot_secret_snprintf(ARGOUT(char *buffer), SHIM(const size_t len),
+        ARGIN(const char *format), ...)
 {
     ASSERT_ARGS(Parrot_secret_snprintf)
     int retval;

Modified: trunk/src/pbc_info.c
==============================================================================
--- trunk/src/pbc_info.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pbc_info.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -62,7 +62,7 @@
 */
 
 int
-main(int argc, char *argv[])
+main(SHIM(int argc), char *argv[])
 {
     PackFile *pf;
     Interp *interp;

Modified: trunk/src/pmc/bigint.pmc
==============================================================================
--- trunk/src/pmc/bigint.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/bigint.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -606,6 +606,7 @@
 
 */
     VTABLE PMC *instantiate(PMC *sig) {
+        UNUSED(sig)
         return PMCNULL;
 
         /* TODO -- actually build this thing */
@@ -852,6 +853,7 @@
     }
 
     MULTI PMC *add(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'add' for %Ss",
@@ -885,6 +887,7 @@
     }
 
     VTABLE void i_add_float(FLOATVAL value) {
+        UNUSED(value)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'i_add_float' for FLOATVAL");
@@ -912,6 +915,7 @@
     }
 
     MULTI PMC *subtract(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'subtract' for %Ss",
@@ -948,6 +952,7 @@
     }
 
     VTABLE void i_subtract_float(FLOATVAL value) {
+        UNUSED(value)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'i_subtract_float' for FLOATVAL");
@@ -969,6 +974,7 @@
     }
 
     MULTI PMC *multiply(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
          Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'multiply' for %Ss",
@@ -1000,6 +1006,7 @@
     }
 
     VTABLE void i_multiply_float(FLOATVAL value) {
+        UNUSED(value)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'i_multiply_float' for FLOATVAL");
@@ -1055,6 +1062,7 @@
     }
 
     MULTI PMC *divide(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'divide' for %Ss",
@@ -1103,6 +1111,7 @@
     }
 
     MULTI PMC *floor_divide(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'floor_divide' for %Ss",
@@ -1159,6 +1168,7 @@
     }
 
     MULTI PMC *modulus(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'modulus' for %Ss",
@@ -1296,6 +1306,7 @@
         return dest;
     }
     MULTI PMC *bitwise_shl(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'bitwise_shl' for %Ss",
@@ -1377,6 +1388,7 @@
     }
 
     MULTI PMC *bitwise_shr(DEFAULT value, PMC *dest) {
+        UNUSED(dest)
         Parrot_ex_throw_from_c_args(INTERP, NULL,
             EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
             "BigInt: no multiple dispatch variant 'bitwise_shr' for %Ss",

Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/class.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -1607,6 +1607,7 @@
 
     VTABLE void thawfinish(visit_info *info) {
         Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
+        UNUSED(info)
 
         /* Recalculate full MRO from thawed parents */
         _class->all_parents         = Parrot_ComputeMRO_C3(interp, SELF);

Modified: trunk/src/pmc/continuation.pmc
==============================================================================
--- trunk/src/pmc/continuation.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/continuation.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -234,6 +234,7 @@
         Parrot_Context   *from_ctx     = CONTEXT(interp);
         Parrot_Context   *to_ctx       = cc->to_ctx;
         opcode_t         *pc           = cc->address;
+        UNUSED(next)
 
         Parrot_continuation_check(interp, SELF, cc);
         Parrot_continuation_rewind_environment(interp, SELF, cc);

Modified: trunk/src/pmc/cpointer.pmc
==============================================================================
--- trunk/src/pmc/cpointer.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/cpointer.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -182,6 +182,8 @@
 
     VTABLE STRING *get_string_keyed_str(STRING *key) {
         Parrot_CPointer_attributes * const data = PARROT_CPOINTER(SELF);
+        UNUSED(key)
+
         return data->sig;
     }
 
@@ -197,6 +199,8 @@
 
     VTABLE void set_string_keyed_str(STRING *key, STRING *value) {
         Parrot_CPointer_attributes * const data = PARROT_CPOINTER(SELF);
+        UNUSED(key)
+
         data->sig = value;
     }
 

Modified: trunk/src/pmc/default.pmc
==============================================================================
--- trunk/src/pmc/default.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/default.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -59,6 +59,7 @@
 
 */
 
+PARROT_DOES_NOT_RETURN
 static void
 cant_do_method(PARROT_INTERP, PMC *pmc /*NULLOK*/, const char *methname)
 {
@@ -890,6 +891,7 @@
 */
 
     INTVAL does_pmc(PMC *role) {
+        UNUSED(role)
         /* No C-level roles yet. */
         return 0;
     }
@@ -1021,10 +1023,12 @@
 
 */
     VTABLE PMC *get_attr_keyed(PMC *key, STRING *name) {
+        UNUSED(key)
         return VTABLE_get_attr_str(INTERP, SELF, name);
     }
 
     VTABLE void set_attr_keyed(PMC *key, STRING *name, PMC *value) {
+        UNUSED(key)
         VTABLE_set_attr_str(INTERP, SELF, name, value);
     }
 
@@ -1039,6 +1043,7 @@
 */
 
     VTABLE void add_parent(PMC *parent) {
+        UNUSED(parent)
         if (!PObj_is_class_TEST(SELF))
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
                 "Only classes can be subclassed");
@@ -1097,6 +1102,7 @@
 */
 
     VTABLE void freeze(visit_info *info) {
+        UNUSED(info)
         /* default - no action */
     }
 
@@ -1136,6 +1142,7 @@
 */
 
     VTABLE void thawfinish(visit_info *info) {
+        UNUSED(info)
         /* default - no action */
     }
 

Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/hash.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -35,6 +35,7 @@
 */
 
 static PMC *get_integer_pmc(PARROT_INTERP, INTVAL base_type) {
+    UNUSED(base_type)
     return pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
 }
 
@@ -52,6 +53,7 @@
 */
 
 static PMC *get_number_pmc(PARROT_INTERP, INTVAL base_type) {
+    UNUSED(base_type)
     return pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
 }
 
@@ -68,6 +70,7 @@
 */
 
 static PMC *get_string_pmc(PARROT_INTERP, INTVAL base_type) {
+    UNUSED(base_type)
     return pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
 }
 

Modified: trunk/src/pmc/key.pmc
==============================================================================
--- trunk/src/pmc/key.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/key.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -487,6 +487,7 @@
 
     VTABLE void thawfinish(visit_info *info) {
         PMC *key = SELF;
+        UNUSED(info)
 
         while (1) {
             PMC *next;

Modified: trunk/src/pmc/null.pmc
==============================================================================
--- trunk/src/pmc/null.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/null.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -46,6 +46,7 @@
     }
 
     VTABLE INTVAL does(STRING *what) {
+        UNUSED(what)
         /* XXX maybe a hack to get TGE running again */
         return 0;
     }

Modified: trunk/src/pmc/parrotinterpreter.pmc
==============================================================================
--- trunk/src/pmc/parrotinterpreter.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/parrotinterpreter.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -179,6 +179,8 @@
 recursion_limit(PARROT_INTERP, PMC *self, int l)
 {
     const int ret           = interp->recursion_limit;
+    UNUSED(self)
+
     interp->recursion_limit = l;
     return ret;
 }
@@ -702,6 +704,7 @@
         PMC * const new_info = PMC_args(SELF);
         const INTVAL  m      = VTABLE_elements(INTERP, new_info);
         INTVAL  i;
+        UNUSED(info)
 
         PMC_args(SELF) = NULL;
 

Modified: trunk/src/pmc/retcontinuation.pmc
==============================================================================
--- trunk/src/pmc/retcontinuation.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/retcontinuation.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -92,6 +92,7 @@
         Parrot_Context    *from_ctx   = cc->from_ctx;
         PackFile_ByteCode * const seg = cc->seg;
         opcode_t          *next       = cc->address;
+        UNUSED(in_next)
 
         Parrot_continuation_check(interp, SELF, cc);
         Parrot_continuation_rewind_environment(interp, SELF, cc);

Modified: trunk/src/pmc/sub.pmc
==============================================================================
--- trunk/src/pmc/sub.pmc	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/pmc/sub.pmc	Tue Apr 14 23:41:32 2009	(r38107)
@@ -146,6 +146,7 @@
 */
 
     VTABLE void set_pointer(void *value) {
+        UNUSED(value)
         Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
             "Don't set the address of a sub\nuse .const 'Sub' instead");
     }
@@ -180,6 +181,8 @@
 
     VTABLE INTVAL get_integer_keyed(PMC *key) {
         Parrot_sub *sub;
+        UNUSED(key)
+
         PMC_get_sub(INTERP, SELF, sub);
         return (INTVAL) (sub->seg->base.data);
     }

Modified: trunk/src/scheduler.c
==============================================================================
--- trunk/src/scheduler.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/scheduler.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -725,7 +725,7 @@
 
 PARROT_EXPORT
 void
-Parrot_cx_send_message(PARROT_INTERP, ARGIN(STRING *messagetype), ARGIN_NULLOK(PMC *payload))
+Parrot_cx_send_message(PARROT_INTERP, ARGIN(STRING *messagetype), SHIM(PMC *payload))
 {
     ASSERT_ARGS(Parrot_cx_send_message)
     if (interp->scheduler) {

Modified: trunk/src/string/charset/unicode.c
==============================================================================
--- trunk/src/string/charset/unicode.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/string/charset/unicode.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -746,7 +746,7 @@
 
 static INTVAL
 cs_rindex(PARROT_INTERP, SHIM(STRING *source_string),
-        SHIM(STRING *search_string), UINTVAL offset)
+        SHIM(STRING *search_string), SHIM(UINTVAL offset))
 {
     ASSERT_ARGS(cs_rindex)
     /* TODO: RT #59696 Implement this. */

Modified: trunk/src/string/encoding/ucs2.c
==============================================================================
--- trunk/src/string/encoding/ucs2.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/string/encoding/ucs2.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -256,6 +256,7 @@
     UChar * const s = (UChar*) src->strstart;
     return s[offset];
 #else
+    UNUSED(offset)
     Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
         "no ICU lib loaded");
 #endif
@@ -280,7 +281,9 @@
     UChar * const s = (UChar*) src->strstart;
     s[offset] = codepoint;
 #else
-    UNUSED(src);
+    UNUSED(src)
+    UNUSED(offset)
+    UNUSED(codepoint)
     Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
         "no ICU lib loaded");
 #endif
@@ -298,7 +301,7 @@
 */
 
 static UINTVAL
-get_byte(PARROT_INTERP, SHIM(const STRING *src), UINTVAL offset)
+get_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset))
 {
     ASSERT_ARGS(get_byte)
     UNIMPL;
@@ -316,7 +319,8 @@
 */
 
 static void
-set_byte(PARROT_INTERP, SHIM(const STRING *src), UINTVAL offset, UINTVAL byte)
+set_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
+        SHIM(UINTVAL byte))
 {
     ASSERT_ARGS(set_byte)
     UNIMPL;
@@ -376,7 +380,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 static STRING *
-get_bytes(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count)
+get_bytes(PARROT_INTERP, SHIM(STRING *src), SHIM(UINTVAL offset),
+        SHIM(UINTVAL count))
 {
     ASSERT_ARGS(get_bytes)
     UNIMPL;
@@ -399,7 +404,7 @@
 PARROT_CANNOT_RETURN_NULL
 static STRING *
 get_codepoints_inplace(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *dest_string))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *dest_string))
 {
     ASSERT_ARGS(get_codepoints_inplace)
     UNIMPL;
@@ -421,7 +426,7 @@
 PARROT_CANNOT_RETURN_NULL
 static STRING *
 get_bytes_inplace(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *return_string))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *return_string))
 {
     ASSERT_ARGS(get_bytes_inplace)
     UNIMPL;
@@ -441,7 +446,7 @@
 
 static void
 set_codepoints(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *new_codepoints))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *new_codepoints))
 {
     ASSERT_ARGS(set_codepoints)
     UNIMPL;
@@ -461,7 +466,7 @@
 
 static void
 set_bytes(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *new_bytes))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *new_bytes))
 {
     ASSERT_ARGS(set_bytes)
     UNIMPL;

Modified: trunk/src/string/encoding/utf8.c
==============================================================================
--- trunk/src/string/encoding/utf8.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/string/encoding/utf8.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -854,7 +854,7 @@
 PARROT_CANNOT_RETURN_NULL
 static STRING *
 get_bytes_inplace(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *return_string))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *return_string))
 {
     ASSERT_ARGS(get_bytes_inplace)
     UNIMPL;
@@ -874,7 +874,7 @@
 
 static void
 set_codepoints(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *new_codepoints))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *new_codepoints))
 {
     ASSERT_ARGS(set_codepoints)
     UNIMPL;
@@ -894,7 +894,7 @@
 
 static void
 set_bytes(PARROT_INTERP, SHIM(STRING *src),
-        UINTVAL offset, UINTVAL count, SHIM(STRING *new_bytes))
+        SHIM(UINTVAL offset), SHIM(UINTVAL count), SHIM(STRING *new_bytes))
 {
     ASSERT_ARGS(set_bytes)
     UNIMPL;

Modified: trunk/src/thread.c
==============================================================================
--- trunk/src/thread.c	Tue Apr 14 17:28:25 2009	(r38106)
+++ trunk/src/thread.c	Tue Apr 14 23:41:32 2009	(r38107)
@@ -678,7 +678,7 @@
 */
 
 void
-pt_thread_prepare_for_run(Parrot_Interp d, Parrot_Interp s)
+pt_thread_prepare_for_run(Parrot_Interp d, SHIM(Parrot_Interp s))
 {
     ASSERT_ARGS(pt_thread_prepare_for_run)
     Parrot_setup_event_func_ptrs(d);


More information about the parrot-commits mailing list