diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-03 11:59:01 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-03 11:59:01 +0000 |
commit | 74b4c8139695c52123e8db0761c78bb071a61271 (patch) | |
tree | 5d135f00ed93cc1fffa4675aeeccc56e2fa245e9 /ext/dl/test/test.c | |
parent | 493c57f65a3cde9c0268584aacd93a55782484ef (diff) | |
download | ruby-74b4c8139695c52123e8db0761c78bb071a61271.tar.gz |
Merge Nakada's patch and define StringValuePtr for ruby-1.6.
CV ----------------------------------------------------------------------
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/test/test.c')
-rw-r--r-- | ext/dl/test/test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/dl/test/test.c b/ext/dl/test/test.c index c5ead79813..ed42b4d1a0 100644 --- a/ext/dl/test/test.c +++ b/ext/dl/test/test.c @@ -221,7 +221,8 @@ test_data_add(struct test_data *list, const char *name) struct test_data *data; data = (struct test_data *)malloc(sizeof(struct test_data)); - strcpy(data->name, name); + memset(data->name, 0, 1024); + strncpy(data->name, name, 1024); data->next = list->next; list->next = data; }; @@ -236,7 +237,7 @@ test_data_print(struct test_data *list) }; }; -struct data * +struct test_data * test_data_aref(struct test_data *list, int i) { struct test_data *data; |