Front page | perl.cvs.parrot |
Postings from January 2009
[svn:parrot] r34941 - branches/pdd30install_stage3/src
From:
rurban
Date:
January 4, 2009 14:15
Subject:
[svn:parrot] r34941 - branches/pdd30install_stage3/src
Message ID:
20090104221505.6C043CB9F9@x12.develooper.com
Author: rurban
Date: Sun Jan 4 14:15:03 2009
New Revision: 34941
Modified:
branches/pdd30install_stage3/src/packfile.c
Log:
fix TT #129 load_bytecode without extension, do not recompile the found .pbc.
Modified: branches/pdd30install_stage3/src/packfile.c
==============================================================================
--- branches/pdd30install_stage3/src/packfile.c (original)
+++ branches/pdd30install_stage3/src/packfile.c Sun Jan 4 14:15:03 2009
@@ -3759,17 +3759,19 @@
interp->iglobals, IGLOBALS_PBC_LIBS);
if (VTABLE_exists_keyed_str(interp, is_loaded_hash, wo_ext))
return;
- pbc = CONST_STRING(interp, "pbc");
- if (string_equal(interp, ext, pbc) == 0)
- file_type = PARROT_RUNTIME_FT_PBC;
- else
- file_type = PARROT_RUNTIME_FT_SOURCE;
- path = Parrot_locate_runtime_file_str(interp, file_str, file_type);
+ path = Parrot_locate_runtime_file_str(interp, file_str, PARROT_RUNTIME_FT_PBC);
if (!path)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
"\"load_bytecode\" couldn't find file '%Ss'", file_str);
+ /* we might have found a different file_type now */
+ parrot_split_path_ext(interp, file_str, &wo_ext, &ext);
+ pbc = CONST_STRING(interp, "pbc");
+ if (string_equal(interp, ext, pbc) == 0)
+ file_type = PARROT_RUNTIME_FT_PBC;
+ else
+ file_type = PARROT_RUNTIME_FT_SOURCE;
/* remember wo_ext => full_path mapping */
VTABLE_set_string_keyed_str(interp, is_loaded_hash,
wo_ext, path);
-
[svn:parrot] r34941 - branches/pdd30install_stage3/src
by rurban