File: 1.9-support

package info (click to toggle)
ruby-filesystem 0.5-7
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 128 kB
  • sloc: ansic: 441; makefile: 86; ruby: 47
file content (20 lines) | stat: -rw-r--r-- 482 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/filesystem.c
+++ b/filesystem.c
@@ -69,7 +69,7 @@ static VALUE fs_mounts(int argc, VALUE *
 #endif
 
 	if ( rb_scan_args(argc, argv, "01", &x) == 1 ) {
-		tab = STR2CSTR(x);
+		tab = StringValuePtr(x);
 	} else {
 		tab = MOUNTLIST;
 	}
@@ -97,7 +97,7 @@ static VALUE fs_mounts(int argc, VALUE *
 static VALUE fs_stat(VALUE obj, VALUE dir)
 {
 	struct statvfs fs;
-	char *s = STR2CSTR(dir);
+	char *s = StringValuePtr(dir);
 
 	if ( statvfs(s, &fs) < 0 ) {
 		rb_sys_fail(s);