summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-27 05:23:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-27 05:23:38 +0000
commit185aca62a4a1bc66021112750ab9b6b652829d8e (patch)
tree46e3fba5bdc066f232f71e5443c2ebaf02137794 /ext
parentbe37924fb77934dd5e0a6754c81769621e0e0407 (diff)
* ext/dl/dl.c (c_parray): get rid of a deprecated function.
* ext/dl/handle.c (rb_dlhandle_sym): conditionally used variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/dl.c2
-rw-r--r--ext/dl/handle.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index 8a4643c7de..5813adc58b 100644
--- a/ext/dl/dl.c
+++ b/ext/dl/dl.c
@@ -417,7 +417,7 @@ c_parray(VALUE v, long *size)
e = tmp;
/* fall through */
case T_STRING:
- rb_check_safe_str(e);
+ SafeStringValue(e);
{
char *str, *src;
src = RSTRING(e)->ptr;
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 69d47caac0..512d48b253 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -136,7 +136,9 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
struct dl_handle *dlhandle;
void *handle;
const char *name, *stype;
+#if defined(HAVE_DLERROR)
const char *err;
+#endif
rb_secure(2);
if (rb_scan_args(argc, argv, "11", &sym, &type) == 2) {