1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

dln.c: remove last second typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-12-20 16:59:09 +00:00
parent e91e9e7bbf
commit 6228cbe5ef
4 changed files with 17 additions and 16 deletions

View file

@ -41,9 +41,6 @@ Sat Dec 20 02:18:31 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* misc/ruby-mode.el (ruby-calculate-indent): proper indentation
inside of parentheses. [ruby-dev:22308]
* hash.c (delete_if_i): do not use ST_DELETE for thread safety.
[ruby-dev:21899] (not fully solved)
Fri Dec 19 21:24:22 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/webrick/httprequest.rb (HTTPRequest#meta_vars): should not set

2
dln.c
View file

@ -91,7 +91,7 @@ char *getenv();
int eaccess();
+#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
/* dynamic load with dlopen() */
# define USE_DLN_DLOPEN
#endif

10
gc.c
View file

@ -236,6 +236,8 @@ rb_gc_unregister_address(addr)
}
}
#undef GC_DEBUG
void
rb_global_variable(var)
VALUE *var;
@ -266,6 +268,10 @@ typedef struct RVALUE {
struct RVarmap varmap;
struct SCOPE scope;
} as;
#ifdef GC_DEBUG
char *file;
int line;
#endif
} RVALUE;
static RVALUE *freelist = 0;
@ -346,6 +352,10 @@ rb_newobj()
obj = (VALUE)freelist;
freelist = freelist->as.free.next;
MEMZERO((void*)obj, RVALUE, 1);
#ifdef GC_DEBUG
RANY(obj)->file = ruby_sourcefile;
RANY(obj)->line = ruby_sourceline;
#endif
return obj;
}

18
hash.c
View file

@ -460,12 +460,12 @@ rb_hash_shift(hash)
}
static enum st_retval
delete_if_i(key, value, keys)
VALUE key, value, keys;
delete_if_i(key, value)
VALUE key, value;
{
if (key != Qundef && RTEST(rb_yield_values(2, key, value))) {
rb_ary_push(keys, key);
}
if (key == Qundef) return ST_CONTINUE;
if (RTEST(rb_yield_values(2, key, value)))
return ST_DELETE;
return ST_CONTINUE;
}
@ -473,14 +473,8 @@ VALUE
rb_hash_delete_if(hash)
VALUE hash;
{
VALUE keys = rb_ary_new();
long i;
rb_hash_modify(hash);
rb_hash_foreach(hash, delete_if_i, keys);
for (i=0; i<RARRAY(keys)->len; i++) {
st_delete(RHASH(hash)->tbl, &RARRAY(keys)->ptr[i], 0);
}
rb_hash_foreach(hash, delete_if_i, 0);
return hash;
}