[DRE-commits] [ruby-fusefs] 06/08: port to newer rubyies

Cédric Boutillier boutil at moszumanska.debian.org
Fri Dec 20 11:44:13 UTC 2013


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-fusefs.

commit 3a0d1ad93e5950f8d84bfc54d29b435db98d7627
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri Dec 20 12:12:14 2013 +0100

    port to newer rubyies
---
 debian/patches/port-to-newer-ruby.patch | 75 +++++++++++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 2 files changed, 76 insertions(+)

diff --git a/debian/patches/port-to-newer-ruby.patch b/debian/patches/port-to-newer-ruby.patch
new file mode 100644
index 0000000..2cf9227
--- /dev/null
+++ b/debian/patches/port-to-newer-ruby.patch
@@ -0,0 +1,75 @@
+Description: port to Ruby 1.9.1 and 2.0
+ add also some missing headers and fix a typo
+Author: Cédric Boutillier <boutil at debian.org>
+Origin: vendor
+Forwarded: https://github.com/duairc/fusefs/pull/4
+Last-Update: 2013-12-20
+
+--- a/ext/fusefs_lib.c
++++ b/ext/fusefs_lib.c
+@@ -17,6 +17,8 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <ruby.h>
++#include <unistd.h>
++#include <ctype.h>
+ 
+ #ifdef DEBUG
+ #include <stdarg.h>
+@@ -452,7 +454,7 @@
+     if (TYPE(cur_entry) != T_STRING)
+       continue;
+ 
+-    filler(buf,STR2CSTR(cur_entry),NULL,0);
++    filler(buf,StringValuePtr(cur_entry),NULL,0);
+   }
+   return 0;
+ }
+@@ -660,7 +662,8 @@
+     /* We have the body, now save it the entire contents to our
+      * opened_file lists. */
+     newfile = ALLOC(opened_file);
+-    value = rb_str2cstr(body,&newfile->size);
++    value = RSTRING_PTR(body);
++    newfile->size = RSTRING_LEN(body);
+     newfile->value = ALLOC_N(char,(newfile->size)+1);
+     memcpy(newfile->value,value,newfile->size);
+     newfile->value[newfile->size] = '\0';
+@@ -715,7 +718,8 @@
+       /* We have the body, now save it the entire contents to our
+        * opened_file lists. */
+       newfile = ALLOC(opened_file);
+-      value = rb_str2cstr(body,&newfile->size);
++      value = RSTRING_PTR(body);
++      newfile->size = RSTRING_LEN(body);
+       newfile->value = ALLOC_N(char,(newfile->size)+1);
+       memcpy(newfile->value,value,newfile->size);
+       newfile->writesize = newfile->size+1;
+@@ -1074,7 +1078,8 @@
+       rf_call(path,id_write_to,newstr);
+     } else {
+       long size;
+-      char *str = rb_str2cstr(body,&size);
++      char *str = RSTRING_PTR(body);
++      size = RSTRING_LEN(body);
+ 
+       /* Just in case offset is bigger than the file. */
+       if (offset >= size) return 0;
+@@ -1253,7 +1258,7 @@
+       return 0;
+     if (TYPE(ret) != T_STRING)
+       return 0;
+-    memcpy(buf, RSTRING_LEN(ret), RSTRING_LEN(ret));
++    memcpy(buf, RSTRING_PTR(ret), RSTRING_LEN(ret));
+     return RSTRING_LEN(ret);
+   }
+ 
+@@ -1390,7 +1395,7 @@
+   }
+ 
+   rb_iv_set(cFuseFS,"@mountpoint",mountpoint);
+-  fusefs_setup(STR2CSTR(mountpoint), &rf_oper, opts);
++  fusefs_setup(StringValuePtr(mountpoint), &rf_oper, opts);
+   return Qtrue;
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index fe4a1f5..a680d27 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+port-to-newer-ruby.patch
 fix-dynamic-library-load-path.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fusefs.git



More information about the Pkg-ruby-extras-commits mailing list