=== src/embed.c
==================================================================
|
|
|
|
| 440 | 440 | #endif |
| 441 | 441 | /* if we've opened a file (or stdin) with PIO, read it in */ |
| 442 | 442 | if (io) { |
| | 443 | char *cursor; |
| 443 | 444 | size_t chunk_size = program_size > 0 ? program_size : 1024; |
| 444 | 445 | INTVAL wanted = program_size; |
| 445 | | char *cursor; |
| 446 | 446 | size_t read_result; |
| 447 | 447 | |
| 448 | 448 | program_code = (char *)mem_sys_allocate(chunk_size); |
| … |
… |
|
| 461 | 461 | Parrot_io_eprintf(interp, |
| 462 | 462 | "Parrot VM: Could not reallocate buffer " |
| 463 | 463 | "while reading packfile from PIO.\n"); |
| | 464 | fclose(io); |
| 464 | 465 | return NULL; |
| 465 | 466 | } |
| 466 | 467 | |
=item C<void PackFile_fixup_subs>
=== t/pmc/eval.t
==================================================================
|
|
|
|
| 1 | 1 | #! perl |
| 2 | | # Copyright (C) 2001-2008, The Perl Foundation. |
| | 2 | # Copyright (C) 2001-2009, The Perl Foundation. |
| 3 | 3 | # $Id$ |
| 4 | 4 | |
| 5 | 5 | use strict; |
| … |
… |
|
| 316 | 316 | 2 1 1 1 |
| 317 | 317 | OUTPUT |
| 318 | 318 | |
| 319 | | TODO: { |
| 320 | | local $TODO = "cannot 'rm' an open file on windows. TT#121" if $^O =~ /(MSWin32|cygwin)/; |
| | 319 | (my $fh, $temp_pbc) = create_tempfile( SUFFIX => '.pbc', UNLINK => 1 ); |
| | 320 | close $fh; |
| | 321 | |
| 321 | 322 | pir_output_is( <<"CODE", <<'OUTPUT', "eval.get_string - same file" ); |
| 322 | 323 | .sub main :main |
| 323 | | |
| 324 | 324 | .local pmc f1, f2 |
| 325 | 325 | .local pmc io, os |
| 326 | 326 | f1 = compi("foo_1", "hello from foo_1") |
| … |
… |
|
| 358 | 358 | CODE |
| 359 | 359 | hello from foo_1 |
| 360 | 360 | OUTPUT |
| 361 | | } |
| 362 | 361 | |
| 363 | 362 | my (undef, $temp_file) = create_tempfile( UNLINK => 1 ); |
| 364 | 363 | |