Permalink
Browse files

[codingstd] untabify t/src/embed/api.t [GH #816]

  • Loading branch information...
1 parent 98602e1 commit fcbbad074cbc96a1726b825dae0cf0100a0d16c8 Reini Urban committed Dec 12, 2012
Showing with 19 additions and 23 deletions.
  1. +19 −23 t/src/embed/api.t
View
@@ -410,40 +410,37 @@ c_output_is( linedirective(__LINE__) . <<"CODE", << 'OUTPUT', "Parrot_api_get_re
#include "imcc/api.h"
void report_error(Parrot_PMC interp_pmc) {
- Parrot_Int is_error, exit_code;
- Parrot_String backtrace_str, error_str;
- Parrot_PMC exception_pmc;
- char * backtrace, * error;
- Parrot_api_get_result(interp_pmc, &is_error, &exception_pmc, &exit_code, &error_str);
- Parrot_api_get_exception_backtrace(interp_pmc, exception_pmc, &backtrace_str);
+ Parrot_Int is_error, exit_code;
+ Parrot_String backtrace_str, error_str;
+ Parrot_PMC exception_pmc;
+ char * backtrace, * error;
+ Parrot_api_get_result(interp_pmc, &is_error, &exception_pmc, &exit_code, &error_str);
+ Parrot_api_get_exception_backtrace(interp_pmc, exception_pmc, &backtrace_str);
- Parrot_api_string_export_ascii(interp_pmc, error_str, &error);
+ Parrot_api_string_export_ascii(interp_pmc, error_str, &error);
- puts(error);
+ puts(error);
fflush(NULL);
- Parrot_api_string_free_exported_ascii(interp_pmc, error);
-
+ Parrot_api_string_free_exported_ascii(interp_pmc, error);
}
int main(int argc, char **argv) {
- Parrot_PMC interp_pmc;
- Parrot_PMC bytecode_pmc;
+ Parrot_PMC interp_pmc;
+ Parrot_PMC bytecode_pmc;
Parrot_PMC pir_pmc;
- Parrot_String filename_str;
- Parrot_api_make_interpreter(NULL, 0, NULL, &interp_pmc);
- Parrot_api_string_import_ascii(interp_pmc, "$temp_pir", &filename_str);
+ Parrot_String filename_str;
+ Parrot_api_make_interpreter(NULL, 0, NULL, &interp_pmc);
+ Parrot_api_string_import_ascii(interp_pmc, "$temp_pir", &filename_str);
imcc_get_pir_compreg_api(interp_pmc, 1, &pir_pmc);
imcc_compile_file_api(interp_pmc, pir_pmc, filename_str, &bytecode_pmc);
- if(!Parrot_api_run_bytecode(interp_pmc, bytecode_pmc, NULL)) {
- report_error(interp_pmc);
- }
- if(!Parrot_api_run_bytecode(interp_pmc, bytecode_pmc, NULL)) {
- report_error(interp_pmc);
- }
- Parrot_api_destroy_interpreter(interp_pmc);
+ if(!Parrot_api_run_bytecode(interp_pmc, bytecode_pmc, NULL))
+ report_error(interp_pmc);
+ if(!Parrot_api_run_bytecode(interp_pmc, bytecode_pmc, NULL))
+ report_error(interp_pmc);
+ Parrot_api_destroy_interpreter(interp_pmc);
exit(0);
}
CODE
@@ -459,4 +456,3 @@ OUTPUT
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
-

0 comments on commit fcbbad0

Please sign in to comment.