Skip to content
This repository
Browse code

consting local arguments

  • Loading branch information...
commit 353b6ac3ef195a68b8d8ffa27c91a72e265cb5ef 1 parent f3a9b26
Andy Lester authored October 11, 2011

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  src/pmc/nativepccmethod.pmc
8  src/pmc/nativepccmethod.pmc
@@ -38,7 +38,7 @@ Initializes the PMC with a C<NULL> function pointer.
38 38
 */
39 39
 
40 40
     VTABLE void init() {
41  
-        Parrot_NativePCCMethod_attributes *attrs = PARROT_NATIVEPCCMETHOD(SELF);
  41
+        Parrot_NativePCCMethod_attributes * const attrs = PARROT_NATIVEPCCMETHOD(SELF);
42 42
 
43 43
         attrs->func               = NULL;
44 44
         attrs->signature          = STRINGNULL;
@@ -146,7 +146,7 @@ Mark contained elements for GC.
146 146
 */
147 147
 
148 148
     VTABLE void mark() {
149  
-        Parrot_NativePCCMethod_attributes *attrs = PARROT_NATIVEPCCMETHOD(SELF);
  149
+        const Parrot_NativePCCMethod_attributes * const attrs = PARROT_NATIVEPCCMETHOD(SELF);
150 150
 
151 151
         Parrot_gc_mark_STRING_alive(interp, attrs->signature);
152 152
         Parrot_gc_mark_STRING_alive(interp, attrs->mmd_long_signature);
@@ -165,8 +165,8 @@ Create a clone of this PMC.
165 165
 
166 166
     VTABLE PMC *clone() {
167 167
         PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
168  
-        Parrot_NativePCCMethod_attributes *self_attrs = PARROT_NATIVEPCCMETHOD(SELF);
169  
-        Parrot_NativePCCMethod_attributes *ret_attrs  = PARROT_NATIVEPCCMETHOD(ret);
  168
+        const Parrot_NativePCCMethod_attributes * const self_attrs = PARROT_NATIVEPCCMETHOD(SELF);
  169
+        Parrot_NativePCCMethod_attributes * const ret_attrs  = PARROT_NATIVEPCCMETHOD(ret);
170 170
 
171 171
         ret_attrs->func               = self_attrs->func;
172 172
         ret_attrs->signature          = self_attrs->signature;

0 notes on commit 353b6ac

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