[svn:parrot] r39431 - in branches/add_library_path_remove: compilers/imcc include/parrot src
Infinoid at svn.parrot.org
Infinoid at svn.parrot.org
Sat Jun 6 13:51:25 UTC 2009
Author: Infinoid
Date: Sat Jun 6 13:51:24 2009
New Revision: 39431
URL: https://trac.parrot.org/parrot/changeset/39431
Log:
Perform TT #455 API updates, get the callers working. Everything builds now.
Modified:
branches/add_library_path_remove/compilers/imcc/main.c
branches/add_library_path_remove/include/parrot/library.h
branches/add_library_path_remove/src/library.c
branches/add_library_path_remove/src/packfile.c
Modified: branches/add_library_path_remove/compilers/imcc/main.c
==============================================================================
--- branches/add_library_path_remove/compilers/imcc/main.c Sat Jun 6 13:27:02 2009 (r39430)
+++ branches/add_library_path_remove/compilers/imcc/main.c Sat Jun 6 13:51:24 2009 (r39431)
@@ -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: branches/add_library_path_remove/include/parrot/library.h
==============================================================================
--- branches/add_library_path_remove/include/parrot/library.h Sat Jun 6 13:27:02 2009 (r39430)
+++ branches/add_library_path_remove/include/parrot/library.h Sat Jun 6 13:51:24 2009 (r39431)
@@ -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: branches/add_library_path_remove/src/library.c
==============================================================================
--- branches/add_library_path_remove/src/library.c Sat Jun 6 13:27:02 2009 (r39430)
+++ branches/add_library_path_remove/src/library.c Sat Jun 6 13:51:24 2009 (r39431)
@@ -594,10 +594,10 @@
/*
-=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(PARROT_INTERP, STRING *path_str, enum_lib_paths
+which)>
-Add a path to the library searchpath of the given type (passing in a C string).
+Add a path to the library searchpath of the given type (passing in a STRING).
=cut
@@ -605,12 +605,11 @@
PARROT_EXPORT
void
-Parrot_add_library_path_from_cstring(PARROT_INTERP,
- ARGIN(const char *path),
+Parrot_lib_add_path(PARROT_INTERP,
+ ARGIN(STRING *path_str),
enum_lib_paths which)
{
- ASSERT_ARGS(Parrot_add_library_path_from_cstring)
- STRING * const path_str = Parrot_str_new(interp, path, 0);
+ 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);
@@ -620,6 +619,28 @@
/*
+=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).
+
+=cut
+
+*/
+
+PARROT_EXPORT
+void
+Parrot_lib_add_path_from_cstring(PARROT_INTERP,
+ ARGIN(const char *path),
+ enum_lib_paths which)
+{
+ ASSERT_ARGS(Parrot_lib_add_path_from_cstring)
+ STRING * const path_str = Parrot_str_new(interp, path, 0);
+ Parrot_lib_add_path(interp, path_str, which);
+}
+
+/*
+
=item C<STRING* Parrot_locate_runtime_file_str(PARROT_INTERP, STRING *file,
enum_runtime_ft type)>
Modified: branches/add_library_path_remove/src/packfile.c
==============================================================================
--- branches/add_library_path_remove/src/packfile.c Sat Jun 6 13:27:02 2009 (r39430)
+++ branches/add_library_path_remove/src/packfile.c Sat Jun 6 13:51:24 2009 (r39431)
@@ -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_from_cstring(interp, Parrot_str_append(interp, found_path, "include/"),
+ Parrot_lib_add_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "include/")),
PARROT_LIB_PATH_INCLUDE);
- Parrot_add_library_path_from_cstring(interp, Parrot_str_append(interp, found_path, "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