[svn:parrot] r39432 - in trunk: . compilers/imcc include/parrot src

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sat Jun 6 14:22:25 UTC 2009


Author: jkeenan
Date: Sat Jun  6 14:22:24 2009
New Revision: 39432
URL: https://trac.parrot.org/parrot/changeset/39432

Log:
Merge add_library_path_remove branch into trunk, per https://trac.parrot.org/parrot/ticket/455.  Complete deprecation of Parrot_add_library_path.

Modified:
   trunk/DEPRECATED.pod
   trunk/compilers/imcc/main.c
   trunk/include/parrot/library.h
   trunk/src/library.c
   trunk/src/packfile.c

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod	Sat Jun  6 13:51:24 2009	(r39431)
+++ trunk/DEPRECATED.pod	Sat Jun  6 14:22:24 2009	(r39432)
@@ -205,12 +205,6 @@
 
 L<https://trac.parrot.org/parrot/ticket/443>
 
-=item Parrot_add_library_path [eligible in 1.1]
-
-Will be renamed to C<Parrot_lib_add_path_from_cstring>.
-
-L<https://trac.parrot.org/parrot/ticket/455>
-
 =item parrot_new_pmc_hash [eligible in 1.5]
 
 This function will be removed.  parrot_new_hash should be used in its place.

Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c	Sat Jun  6 13:51:24 2009	(r39431)
+++ trunk/compilers/imcc/main.c	Sat Jun  6 14:22:24 2009	(r39432)
@@ -529,15 +529,15 @@
                 SET_FLAG(PARROT_DESTROY_FLAG);
                 break;
             case 'I':
-                Parrot_add_library_path_from_cstring(interp, opt.opt_arg,
+                Parrot_lib_add_path_from_cstring(interp, opt.opt_arg,
                     PARROT_LIB_PATH_INCLUDE);
                 break;
             case 'L':
-                Parrot_add_library_path_from_cstring(interp, opt.opt_arg,
+                Parrot_lib_add_path_from_cstring(interp, opt.opt_arg,
                     PARROT_LIB_PATH_LIBRARY);
                 break;
             case 'X':
-                Parrot_add_library_path_from_cstring(interp, opt.opt_arg,
+                Parrot_lib_add_path_from_cstring(interp, opt.opt_arg,
                     PARROT_LIB_PATH_DYNEXT);
                 break;
             default:

Modified: trunk/include/parrot/library.h
==============================================================================
--- trunk/include/parrot/library.h	Sat Jun  6 13:51:24 2009	(r39431)
+++ trunk/include/parrot/library.h	Sat Jun  6 14:22:24 2009	(r39432)
@@ -39,20 +39,6 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
-void Parrot_add_library_path(PARROT_INTERP,
-    ARGIN(STRING *path),
-    enum_lib_paths which)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-PARROT_EXPORT
-void Parrot_add_library_path_from_cstring(PARROT_INTERP,
-    ARGIN(const char *path),
-    enum_lib_paths which)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 STRING * Parrot_get_runtime_path(PARROT_INTERP)
         __attribute__nonnull__(1);
@@ -64,6 +50,20 @@
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
+void Parrot_lib_add_path(PARROT_INTERP,
+    ARGIN(STRING *path_str),
+    enum_lib_paths which)
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+PARROT_EXPORT
+void Parrot_lib_add_path_from_cstring(PARROT_INTERP,
+    ARGIN(const char *path),
+    enum_lib_paths which)
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PARROT_MALLOC
@@ -100,17 +100,17 @@
         FUNC_MODIFIES(*wo_ext)
         FUNC_MODIFIES(*ext);
 
-#define ASSERT_ARGS_Parrot_add_library_path __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(path)
-#define ASSERT_ARGS_Parrot_add_library_path_from_cstring \
-     __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(path)
 #define ASSERT_ARGS_Parrot_get_runtime_path __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_get_runtime_prefix __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
+#define ASSERT_ARGS_Parrot_lib_add_path __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+       PARROT_ASSERT_ARG(interp) \
+    || PARROT_ASSERT_ARG(path_str)
+#define ASSERT_ARGS_Parrot_lib_add_path_from_cstring \
+     __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+       PARROT_ASSERT_ARG(interp) \
+    || PARROT_ASSERT_ARG(path)
 #define ASSERT_ARGS_Parrot_locate_runtime_file __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(file_name)

Modified: trunk/src/library.c
==============================================================================
--- trunk/src/library.c	Sat Jun  6 13:51:24 2009	(r39431)
+++ trunk/src/library.c	Sat Jun  6 14:22:24 2009	(r39432)
@@ -594,10 +594,10 @@
 
 /*
 
-=item C<void Parrot_add_library_path(PARROT_INTERP, STRING *path, enum_lib_paths
+=item C<void Parrot_lib_add_path(PARROT_INTERP, STRING *path_str, enum_lib_paths
 which)>
 
-Add a path to the library searchpath of the given type.
+Add a path to the library searchpath of the given type (passing in a STRING).
 
 =cut
 
@@ -605,41 +605,38 @@
 
 PARROT_EXPORT
 void
-Parrot_add_library_path(PARROT_INTERP,
-        ARGIN(STRING *path),
+Parrot_lib_add_path(PARROT_INTERP,
+        ARGIN(STRING *path_str),
         enum_lib_paths which)
 {
-    ASSERT_ARGS(Parrot_add_library_path)
+    ASSERT_ARGS(Parrot_lib_add_path)
     PMC * const iglobals = interp->iglobals;
     PMC * const lib_paths = VTABLE_get_pmc_keyed_int(interp, iglobals,
         IGLOBALS_LIB_PATHS);
     PMC * const paths = VTABLE_get_pmc_keyed_int(interp, lib_paths, which);
-    VTABLE_push_string(interp, paths, path);
+    VTABLE_push_string(interp, paths, path_str);
 }
 
 /*
 
-=item C<void Parrot_add_library_path_from_cstring(PARROT_INTERP, const char
-*path, enum_lib_paths which)>
+=item C<void Parrot_lib_add_path_from_cstring(PARROT_INTERP, const char *path,
+enum_lib_paths which)>
 
 Add a path to the library searchpath of the given type (passing in a C string).
 
-This function is just an interface to C<Parrot_add_library_path> for low-level
-code.
-
 =cut
 
 */
 
 PARROT_EXPORT
 void
-Parrot_add_library_path_from_cstring(PARROT_INTERP,
+Parrot_lib_add_path_from_cstring(PARROT_INTERP,
         ARGIN(const char *path),
         enum_lib_paths which)
 {
-    ASSERT_ARGS(Parrot_add_library_path_from_cstring)
+    ASSERT_ARGS(Parrot_lib_add_path_from_cstring)
     STRING * const path_str = Parrot_str_new(interp, path, 0);
-    Parrot_add_library_path(interp, path_str, which);
+    Parrot_lib_add_path(interp, path_str, which);
 }
 
 /*

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Sat Jun  6 13:51:24 2009	(r39431)
+++ trunk/src/packfile.c	Sat Jun  6 14:22:24 2009	(r39432)
@@ -4772,9 +4772,9 @@
     parrot_split_path_ext(interp, path, &found_path, &found_ext);
     name_length = Parrot_str_length(interp, lang_name);
     found_path = Parrot_str_substr(interp, found_path, -name_length, name_length, NULL, 0);
-    Parrot_add_library_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "include/")),
+    Parrot_lib_add_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "include/")),
             PARROT_LIB_PATH_INCLUDE);
-    Parrot_add_library_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "dynext/")),
+    Parrot_lib_add_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "dynext/")),
             PARROT_LIB_PATH_DYNEXT);
 
 


More information about the parrot-commits mailing list