S_mro_get_linear_isa_*() should have an *un*signed level.
authorNicholas Clark <nick@ccl4.org>
Thu, 27 Nov 2008 22:37:41 +0000 (22:37 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 27 Nov 2008 22:37:41 +0000 (22:37 +0000)
[Unless it's a signed concept, use an usigned type.]

p4raw-id: //depot/perl@34948

embed.fnc
mro.c
proto.h

index a14eab3..1a44a50 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2183,8 +2183,8 @@ p |struct mro_meta*       |mro_meta_dup   |NN struct mro_meta* smeta|NN CLONE_PARAMS* pa
 #endif
 Apd    |AV*    |mro_get_linear_isa|NN HV* stash
 #if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT)
-sd     |AV*    |mro_get_linear_isa_c3|NN HV* stash|I32 level
-sd     |AV*    |mro_get_linear_isa_dfs|NN HV* stash|I32 level
+sd     |AV*    |mro_get_linear_isa_c3|NN HV* stash|U32 level
+sd     |AV*    |mro_get_linear_isa_dfs|NN HV* stash|U32 level
 #endif
 : Used in hv.c, mg.c, pp.c, sv.c
 pd     |void   |mro_isa_changed_in|NN HV* stash
diff --git a/mro.c b/mro.c
index 6740d59..36ad3ba 100644 (file)
--- a/mro.c
+++ b/mro.c
@@ -29,7 +29,7 @@ These functions are related to the method resolution order of perl classes
 
 struct mro_alg {
     const char *name;
-    AV *(*resolve)(pTHX_ HV* stash, I32 level);
+    AV *(*resolve)(pTHX_ HV* stash, U32 level);
 };
 
 /* First one is the default */
@@ -152,7 +152,7 @@ invalidated).
 =cut
 */
 static AV*
-S_mro_get_linear_isa_dfs(pTHX_ HV *stash, I32 level)
+S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level)
 {
     AV* retval;
     GV** gvp;
@@ -305,7 +305,7 @@ invalidated).
 */
 
 static AV*
-S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level)
+S_mro_get_linear_isa_c3(pTHX_ HV* stash, U32 level)
 {
     AV* retval;
     GV** gvp;
diff --git a/proto.h b/proto.h
index a2c99a2..59192ea 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -6568,12 +6568,12 @@ PERL_CALLCONV AV*       Perl_mro_get_linear_isa(pTHX_ HV* stash)
        assert(stash)
 
 #if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT)
-STATIC AV*     S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level)
+STATIC AV*     S_mro_get_linear_isa_c3(pTHX_ HV* stash, U32 level)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_C3 \
        assert(stash)
 
-STATIC AV*     S_mro_get_linear_isa_dfs(pTHX_ HV* stash, I32 level)
+STATIC AV*     S_mro_get_linear_isa_dfs(pTHX_ HV* stash, U32 level)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_DFS        \
        assert(stash)