Ticket #455: add_library_path.diff
| File add_library_path.diff, 3.1 KB (added by jkeenan, 4 years ago) |
|---|
-
DEPRECATED.pod
205 205 206 206 L<https://trac.parrot.org/parrot/ticket/443> 207 207 208 =item Parrot_add_library_path [eligible in 1.1]209 210 Will be renamed to C<Parrot_lib_add_path_from_cstring>.211 212 L<https://trac.parrot.org/parrot/ticket/455>213 214 208 =item parrot_new_pmc_hash [eligible in 1.5] 215 209 216 210 This function will be removed. parrot_new_hash should be used in its place. -
src/library.c
594 594 595 595 /* 596 596 597 =item C<void Parrot_add_library_path(PARROT_INTERP, STRING *path, enum_lib_paths598 which)>599 600 Add a path to the library searchpath of the given type.601 602 =cut603 604 */605 606 PARROT_EXPORT607 void608 Parrot_add_library_path(PARROT_INTERP,609 ARGIN(STRING *path),610 enum_lib_paths which)611 {612 ASSERT_ARGS(Parrot_add_library_path)613 PMC * const iglobals = interp->iglobals;614 PMC * const lib_paths = VTABLE_get_pmc_keyed_int(interp, iglobals,615 IGLOBALS_LIB_PATHS);616 PMC * const paths = VTABLE_get_pmc_keyed_int(interp, lib_paths, which);617 VTABLE_push_string(interp, paths, path);618 }619 620 /*621 622 597 =item C<void Parrot_add_library_path_from_cstring(PARROT_INTERP, const char 623 598 *path, enum_lib_paths which)> 624 599 625 600 Add a path to the library searchpath of the given type (passing in a C string). 626 601 627 This function is just an interface to C<Parrot_add_library_path> for low-level628 code.629 630 602 =cut 631 603 632 604 */ … … 639 611 { 640 612 ASSERT_ARGS(Parrot_add_library_path_from_cstring) 641 613 STRING * const path_str = Parrot_str_new(interp, path, 0); 642 Parrot_add_library_path(interp, path_str, which); 614 PMC * const iglobals = interp->iglobals; 615 PMC * const lib_paths = VTABLE_get_pmc_keyed_int(interp, iglobals, 616 IGLOBALS_LIB_PATHS); 617 PMC * const paths = VTABLE_get_pmc_keyed_int(interp, lib_paths, which); 618 VTABLE_push_string(interp, paths, path_str); 643 619 } 644 620 645 621 /* -
src/packfile.c
4772 4772 parrot_split_path_ext(interp, path, &found_path, &found_ext); 4773 4773 name_length = Parrot_str_length(interp, lang_name); 4774 4774 found_path = Parrot_str_substr(interp, found_path, -name_length, name_length, NULL, 0); 4775 Parrot_add_library_path (interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "include/")),4775 Parrot_add_library_path_from_cstring(interp, Parrot_str_append(interp, found_path, "include/"), 4776 4776 PARROT_LIB_PATH_INCLUDE); 4777 Parrot_add_library_path (interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "dynext/")),4777 Parrot_add_library_path_from_cstring(interp, Parrot_str_append(interp, found_path, "dynext/"), 4778 4778 PARROT_LIB_PATH_DYNEXT); 4779 4779 4780 4780
