[DRE-commits] [SCM] ruby-ncursesw.git branch, master, updated. debian/1.3.1-1-5-gc0ccfad

Per Andersson avtobiff at gmail.com
Mon Apr 9 15:02:02 UTC 2012


The following commit has been merged in the master branch:
commit 3e809291199f452583ce8e367e1eec5b1d9f2e45
Author: Per Andersson <avtobiff at gmail.com>
Date:   Mon Apr 9 16:52:07 2012 +0200

    Include patch for Ruby >= 1.9.0 compatibility.

diff --git a/debian/patches/0001-Define-STR2CSTR-macro.patch b/debian/patches/0001-Define-STR2CSTR-macro.patch
new file mode 100644
index 0000000..f3937a4
--- /dev/null
+++ b/debian/patches/0001-Define-STR2CSTR-macro.patch
@@ -0,0 +1,78 @@
+From: Per Andersson <avtobiff at gmail.com>
+Date: Mon, 9 Apr 2012 16:49:52 +0200
+Subject: Define STR2CSTR macro
+
+STR2CSTR is removed since Ruby 1.9.0. Define it to make ruby-ncursesw
+work for Ruby >= 1.9.0.
+---
+ compat.h       |    8 ++++++++
+ form_wrap.c    |    1 +
+ menu_wrap.c    |    1 +
+ ncurses_wrap.c |    1 +
+ panel_wrap.c   |    1 +
+ 5 files changed, 12 insertions(+), 0 deletions(-)
+ create mode 100644 compat.h
+
+diff --git a/compat.h b/compat.h
+new file mode 100644
+index 0000000..3d07271
+--- /dev/null
++++ b/compat.h
+@@ -0,0 +1,8 @@
++#ifndef _COMPAT_H
++#define _COMPAT_H
++
++#ifndef STR2CSTR
++#define STR2CSTR(x) ({ VALUE *y = (x); StringValuePtr(y); })
++#endif
++
++#endif /* _COMPAT_H */
+diff --git a/form_wrap.c b/form_wrap.c
+index 346d443..c1a9e47 100644
+--- a/form_wrap.c
++++ b/form_wrap.c
+@@ -31,6 +31,7 @@
+ 
+ #include "form_wrap.h"
+ #include "ncurses_wrap.h"
++#include "compat.h"
+ 
+ VALUE mForm;
+ VALUE cFIELD;
+diff --git a/menu_wrap.c b/menu_wrap.c
+index f76582f..2878723 100644
+--- a/menu_wrap.c
++++ b/menu_wrap.c
+@@ -30,6 +30,7 @@
+ 
+ #include "menu_wrap.h"
+ #include "ncurses_wrap.h"
++#include "compat.h"
+ 
+ VALUE mMenu;
+ VALUE cITEM;
+diff --git a/ncurses_wrap.c b/ncurses_wrap.c
+index 09609d1..f342c61 100755
+--- a/ncurses_wrap.c
++++ b/ncurses_wrap.c
+@@ -65,6 +65,7 @@
+ */
+ 
+ #include "ncurses_wrap.h"
++#include "compat.h"
+ #ifdef HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+diff --git a/panel_wrap.c b/panel_wrap.c
+index 9680b25..53b282b 100644
+--- a/panel_wrap.c
++++ b/panel_wrap.c
+@@ -24,6 +24,7 @@
+ 
+ #include "panel_wrap.h"
+ #include "ncurses_wrap.h"
++#include "compat.h"
+ 
+ VALUE mPanel;
+ VALUE cPANEL;
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9f6de4f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Define-STR2CSTR-macro.patch

-- 
ruby-ncursesw.git



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