diff options
author | Mike Pall <mike> | 2013-05-12 23:52:09 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-05-12 23:52:09 +0200 |
commit | 19a9206caf1df71308bd8e4bd61c082026c6811c (patch) | |
tree | ff4827d89b46e6b6d0bc4ab90110496d6e8387be /src/lib_io.c | |
parent | 7d5acc29181a5194b05fd4650b9e28e4c4978ad1 (diff) | |
download | luajit-19a9206caf1df71308bd8e4bd61c082026c6811c.tar.gz luajit-19a9206caf1df71308bd8e4bd61c082026c6811c.tar.bz2 luajit-19a9206caf1df71308bd8e4bd61c082026c6811c.zip |
Refactor internal string formatting.
Diffstat (limited to 'src/lib_io.c')
-rw-r--r-- | src/lib_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib_io.c b/src/lib_io.c index 18d87a89..cae56579 100644 --- a/src/lib_io.c +++ b/src/lib_io.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "lj_buf.h" | 22 | #include "lj_buf.h" |
23 | #include "lj_str.h" | 23 | #include "lj_str.h" |
24 | #include "lj_state.h" | 24 | #include "lj_state.h" |
25 | #include "lj_strfmt.h" | ||
25 | #include "lj_ff.h" | 26 | #include "lj_ff.h" |
26 | #include "lj_lib.h" | 27 | #include "lj_lib.h" |
27 | 28 | ||
@@ -85,7 +86,7 @@ static IOFileUD *io_file_open(lua_State *L, const char *mode) | |||
85 | IOFileUD *iof = io_file_new(L); | 86 | IOFileUD *iof = io_file_new(L); |
86 | iof->fp = fopen(fname, mode); | 87 | iof->fp = fopen(fname, mode); |
87 | if (iof->fp == NULL) | 88 | if (iof->fp == NULL) |
88 | luaL_argerror(L, 1, lj_str_pushf(L, "%s: %s", fname, strerror(errno))); | 89 | luaL_argerror(L, 1, lj_strfmt_pushf(L, "%s: %s", fname, strerror(errno))); |
89 | return iof; | 90 | return iof; |
90 | } | 91 | } |
91 | 92 | ||