diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-06 01:42:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-06 01:42:37 +0000 |
commit | 75ffce28637a0d0d510dcd99ba90df38000b4be5 (patch) | |
tree | af57ee4747c6579a7e688984ef040bef2ce23722 /mjit.c | |
parent | 63bbd8eecd1e6cec4ccf6a6d565e5cd93a3cfeed (diff) | |
download | ruby-75ffce28637a0d0d510dcd99ba90df38000b4be5.tar.gz |
mjit.c: use ruby_strdup as get_string
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -81,6 +81,7 @@ #include "constant.h" #include "id_table.h" #include "ruby_assert.h" +#include "ruby/util.h" #ifdef _WIN32 #include <winsock2.h> @@ -221,15 +222,7 @@ real_ms_time(void) /* Make and return copy of STR in the heap. Return NULL in case of a failure. */ -static char * -get_string(const char *str) -{ - char *res; - - if ((res = xmalloc(strlen(str) + 1)) != NULL) - strcpy(res, str); - return res; -} +#define get_string ruby_strdup static void sprint_uniq_filename(char *str, unsigned long id, const char *prefix, const char *suffix) |