perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r28111 - in trunk: include/parrot src

Subject: [svn:parrot] r28111 - in trunk: include/parrot src
From:
Date: Thu, 5 Jun 2008 12:27:08 -0700 PDT
Newsgroups: perl.cvs.parrot

Author: coke
Date: Thu Jun  5 12:27:08 2008
New Revision: 28111

Modified:
   trunk/include/parrot/mmd.h
   trunk/src/mmd.c

Log:

Eliminate a magic constant and replace it with a magic define.

(RT#45953)



Modified: trunk/include/parrot/mmd.h
==============================================================================
--- trunk/include/parrot/mmd.h  (original)
+++ trunk/include/parrot/mmd.h  Thu Jun  5 12:27:08 2008
@@ -17,6 +17,8 @@
 #include "parrot/compiler.h"
 #include "parrot/parrot.h"
 
+#define PARROT_MMD_MAX_CLASS_DEPTH 1000
+
 /* function typedefs */
 typedef PMC*    (*mmd_f_p_ppp)(PARROT_INTERP, PMC *, PMC *, PMC *);
 typedef PMC*    (*mmd_f_p_pip)(PARROT_INTERP, PMC *, INTVAL, PMC *);

Modified: trunk/src/mmd.c
==============================================================================
--- trunk/src/mmd.c     (original)
+++ trunk/src/mmd.c     Thu Jun  5 12:27:08 2008
@@ -1540,7 +1540,7 @@
     dist = 0;
 
     if (args > n)
-        dist = 1000;   /* RT #45953 arbitrary > max_class_depth * n */
+        dist = PARROT_MMD_MAX_CLASS_DEPTH;
 
     /* now go through args */
     for (i = 0; i < n; ++i) {

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r28111 - in trunk: include/parrot src, coke <=