[svn:parrot] r40111 - in trunk: config/gen include/parrot t/library

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed Jul 15 22:14:39 UTC 2009


Author: NotFound
Date: Wed Jul 15 22:14:37 2009
New Revision: 40111
URL: https://trac.parrot.org/parrot/changeset/40111

Log:
[config] generate pir constants from PARROT_LIB_ enums in library.h, TT #747

Modified:
   trunk/config/gen/parrot_include.pm
   trunk/include/parrot/library.h
   trunk/t/library/pcre.t

Modified: trunk/config/gen/parrot_include.pm
==============================================================================
--- trunk/config/gen/parrot_include.pm	Wed Jul 15 19:34:47 2009	(r40110)
+++ trunk/config/gen/parrot_include.pm	Wed Jul 15 22:14:37 2009	(r40111)
@@ -36,6 +36,7 @@
         include/parrot/hash.h
         include/parrot/interpreter.h
         include/parrot/io.h
+        include/parrot/library.h
         include/parrot/longopt.h
         include/parrot/multidispatch.h
         include/parrot/packfile.h

Modified: trunk/include/parrot/library.h
==============================================================================
--- trunk/include/parrot/library.h	Wed Jul 15 19:34:47 2009	(r40110)
+++ trunk/include/parrot/library.h	Wed Jul 15 22:14:37 2009	(r40111)
@@ -25,6 +25,7 @@
     PARROT_RUNTIME_FT_SOURCE  = 0x0F00
 } enum_runtime_ft;
 
+/* &gen_from_enum(libpaths.pasm) */
 typedef enum {
     PARROT_LIB_PATH_INCLUDE,            /* .include "foo" */
     PARROT_LIB_PATH_LIBRARY,            /* load_bytecode "bar" */
@@ -34,6 +35,7 @@
     /* must be last: */
     PARROT_LIB_PATH_SIZE
 } enum_lib_paths;
+/* &end_gen */
 
 /* HEADERIZER BEGIN: src/library.c */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */

Modified: trunk/t/library/pcre.t
==============================================================================
--- trunk/t/library/pcre.t	Wed Jul 15 19:34:47 2009	(r40110)
+++ trunk/t/library/pcre.t	Wed Jul 15 22:14:37 2009	(r40111)
@@ -49,6 +49,7 @@
     pir_output_is( <<"CODE", <<'OUT', 'soup to nuts' );
 
 .include 'iglobals.pasm'
+.include 'libpaths.pasm'
 
 .sub main :main
     .local pmc interp
@@ -57,9 +58,8 @@
     .local pmc lib_paths
     lib_paths = interp[.IGLOBALS_LIB_PATHS]
 
-    # TT #747 - hard-coded magic constant (should be PARROT_LIB_PATH_DYNEXT)
     .local pmc dynext_path
-    dynext_path = lib_paths[2]
+    dynext_path = lib_paths[.PARROT_LIB_PATH_DYNEXT]
     unshift dynext_path, '$pcre_libpath'
 
     load_bytecode 'pcre.pbc'


More information about the parrot-commits mailing list