summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-09-03 07:43:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-09-03 07:43:53 +0000
commitf5da3b6746dba18ab86d11aa49caf97b37ecc6ac (patch)
tree1c472d11ebd04c612140d228a7a5414d3a08e615 /ruby.c
parent264c52f2e6abc33f09e6a891f67bdf7bddbae406 (diff)
1.1c4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ruby.c b/ruby.c
index d39830d..6f2b1d8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -134,7 +134,8 @@ addpath(path)
struct req_list {
char *name;
struct req_list *next;
-} *req_list;
+} req_list_head;
+struct req_list *req_list_last = &req_list_head;
static void
add_modules(mod)
@@ -144,17 +145,18 @@ add_modules(mod)
list = ALLOC(struct req_list);
list->name = mod;
- list->next = req_list;
- req_list = list;
+ list->next = 0;
+ req_list_last->next = list;
+ req_list_last = list;
}
void
ruby_require_modules()
{
- struct req_list *list = req_list;
+ struct req_list *list = req_list_head.next;
struct req_list *tmp;
- req_list = 0;
+ req_list_last = 0;
while (list) {
f_require(Qnil, str_new2(list->name));
tmp = list->next;