diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-16 23:52:15 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-16 23:57:55 -0700 |
commit | 78c5020531a09a242f1d21b94ab128001c04bcdf (patch) | |
tree | 2b0eaef5064ca8ab0267b04983d111bd0bd87239 /087file.cc | |
parent | 8752e6b09e302c88702ab6e7a965daa624ba5213 (diff) | |
download | mu-78c5020531a09a242f1d21b94ab128001c04bcdf.tar.gz |
3374
Diffstat (limited to '087file.cc')
-rw-r--r-- | 087file.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/087file.cc b/087file.cc index 804fee86..ffa6417c 100644 --- a/087file.cc +++ b/087file.cc @@ -19,7 +19,7 @@ case _OPEN_FILE_FOR_READING: { raise << maybe(get(Recipe, r).name) << "'$open-file-for-reading' requires exactly one ingredient, but got '" << inst.original_string << "'\n" << end(); break; } - if (!is_mu_string(inst.ingredients.at(0))) { + if (!is_mu_text(inst.ingredients.at(0))) { raise << maybe(get(Recipe, r).name) << "first ingredient of '$open-file-for-reading' should be a string, but got '" << to_string(inst.ingredients.at(0)) << "'\n" << end(); break; } @@ -35,7 +35,7 @@ case _OPEN_FILE_FOR_READING: { } :(before "End Primitive Recipe Implementations") case _OPEN_FILE_FOR_READING: { - string filename = read_mu_string(ingredients.at(0).at(0)); + string filename = read_mu_text(ingredients.at(0).at(0)); assert(sizeof(long long int) >= sizeof(FILE*)); FILE* f = fopen(filename.c_str(), "r"); long long int result = reinterpret_cast<long long int>(f); @@ -54,7 +54,7 @@ case _OPEN_FILE_FOR_WRITING: { raise << maybe(get(Recipe, r).name) << "'$open-file-for-writing' requires exactly one ingredient, but got '" << inst.original_string << "'\n" << end(); break; } - if (!is_mu_string(inst.ingredients.at(0))) { + if (!is_mu_text(inst.ingredients.at(0))) { raise << maybe(get(Recipe, r).name) << "first ingredient of '$open-file-for-writing' should be a string, but got '" << to_string(inst.ingredients.at(0)) << "'\n" << end(); break; } @@ -70,7 +70,7 @@ case _OPEN_FILE_FOR_WRITING: { } :(before "End Primitive Recipe Implementations") case _OPEN_FILE_FOR_WRITING: { - string filename = read_mu_string(ingredients.at(0).at(0)); + string filename = read_mu_text(ingredients.at(0).at(0)); assert(sizeof(long long int) >= sizeof(FILE*)); long long int result = reinterpret_cast<long long int>(fopen(filename.c_str(), "w")); products.resize(1); |