[svn:parrot] r39430 - in branches/add_library_path_remove: . src
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Jun 6 13:27:02 UTC 2009
Author: jkeenan
Date: Sat Jun 6 13:27:02 2009
New Revision: 39430
URL: https://trac.parrot.org/parrot/changeset/39430
Log:
Partially complete work on TT#455.
Modified:
branches/add_library_path_remove/DEPRECATED.pod
branches/add_library_path_remove/src/library.c
branches/add_library_path_remove/src/packfile.c
Modified: branches/add_library_path_remove/DEPRECATED.pod
==============================================================================
--- branches/add_library_path_remove/DEPRECATED.pod Sat Jun 6 12:37:47 2009 (r39429)
+++ branches/add_library_path_remove/DEPRECATED.pod Sat Jun 6 13:27:02 2009 (r39430)
@@ -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: branches/add_library_path_remove/src/library.c
==============================================================================
--- branches/add_library_path_remove/src/library.c Sat Jun 6 12:37:47 2009 (r39429)
+++ branches/add_library_path_remove/src/library.c Sat Jun 6 13:27:02 2009 (r39430)
@@ -594,39 +594,11 @@
/*
-=item C<void Parrot_add_library_path(PARROT_INTERP, STRING *path, enum_lib_paths
-which)>
-
-Add a path to the library searchpath of the given type.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_add_library_path(PARROT_INTERP,
- ARGIN(STRING *path),
- enum_lib_paths which)
-{
- ASSERT_ARGS(Parrot_add_library_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);
-}
-
-/*
-
=item C<void Parrot_add_library_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
*/
@@ -639,7 +611,11 @@
{
ASSERT_ARGS(Parrot_add_library_path_from_cstring)
STRING * const path_str = Parrot_str_new(interp, path, 0);
- Parrot_add_library_path(interp, path_str, which);
+ 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_str);
}
/*
Modified: branches/add_library_path_remove/src/packfile.c
==============================================================================
--- branches/add_library_path_remove/src/packfile.c Sat Jun 6 12:37:47 2009 (r39429)
+++ branches/add_library_path_remove/src/packfile.c Sat Jun 6 13:27:02 2009 (r39430)
@@ -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_add_library_path_from_cstring(interp, Parrot_str_append(interp, found_path, "include/"),
PARROT_LIB_PATH_INCLUDE);
- Parrot_add_library_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "dynext/")),
+ Parrot_add_library_path_from_cstring(interp, Parrot_str_append(interp, found_path, "dynext/"),
PARROT_LIB_PATH_DYNEXT);
More information about the parrot-commits
mailing list