rpms/ruby/devel ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch, NONE, 1.1 ruby.spec, 1.154, 1.155 ruby-1.8.x-RHASH_SIZE-def.patch, 1.1, NONE
Mamoru Tasaka
mtasaka at fedoraproject.org
Mon May 17 12:50:20 UTC 2010
Author: mtasaka
Update of /cvs/extras/rpms/ruby/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv32265/devel
Modified Files:
ruby.spec
Added Files:
ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch
Removed Files:
ruby-1.8.x-RHASH_SIZE-def.patch
Log Message:
* Mon May 17 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-4
- Patch36 (ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch)
also backport rb_hash_lookup definition (bug 592936)
ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch:
hash.c | 12 ++++++++++++
intern.h | 1 +
ruby.h | 5 +++++
3 files changed, 18 insertions(+)
--- NEW FILE ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch ---
Sat Apr 19 18:42:04 2008 Akinori MUSHA <knu at iDaemons.org>
* intern.h, hash.c (rb_hash_lookup): New internal function to
check if a key exists in a hash, ignoring #default; backported
from 1.9.
Thu Aug 30 08:24:18 2007 Tanaka Akira <akr at fsij.org>
* ruby.h (RHASH_TBL): defined for compatibility to 1.9.
* (RHASH_ITER_LEV): ditto.
* (RHASH_IFNONE): ditto.
* (RHASH_SIZE): ditto.
* (RHASH_EMPTY_P): ditto.
Index: ruby_1_8/ruby.h
===================================================================
--- ruby_1_8/ruby.h (revision 13310)
+++ ruby_1_8/ruby.h (revision 13311)
@@ -374,6 +374,11 @@
int iter_lev;
VALUE ifnone;
};
+#define RHASH_TBL(h) (RHASH(h)->tbl)
+#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev)
+#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
+#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries)
+#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
struct RFile {
struct RBasic basic;
Index: ruby_1_8/hash.c
===================================================================
--- ruby_1_8/hash.c (revision 16077)
+++ ruby_1_8/hash.c (revision 16078)
@@ -454,6 +454,18 @@
return val;
}
+VALUE
+rb_hash_lookup(hash, key)
+ VALUE hash, key;
+{
+ VALUE val;
+
+ if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
+ return Qnil; /* without Hash#default */
+ }
+ return val;
+}
+
/*
* call-seq:
* hsh.fetch(key [, default] ) => obj
Index: ruby_1_8/intern.h
===================================================================
--- ruby_1_8/intern.h (revision 16077)
+++ ruby_1_8/intern.h (revision 16078)
@@ -270,6 +270,7 @@
VALUE rb_hash_new _((void));
VALUE rb_hash_freeze _((VALUE));
VALUE rb_hash_aref _((VALUE, VALUE));
+VALUE rb_hash_lookup _((VALUE, VALUE));
VALUE rb_hash_aset _((VALUE, VALUE, VALUE));
VALUE rb_hash_delete_if _((VALUE));
VALUE rb_hash_delete _((VALUE,VALUE));
Index: ruby.spec
===================================================================
RCS file: /cvs/extras/rpms/ruby/devel/ruby.spec,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -p -r1.154 -r1.155
--- ruby.spec 14 May 2010 19:10:53 -0000 1.154
+++ ruby.spec 17 May 2010 12:50:20 -0000 1.155
@@ -18,7 +18,7 @@
Name: ruby
Version: %{rubyver}%{?dotpatchlevel}
-Release: 3%{?dist}
+Release: 3.1%{?dist}
License: Ruby or GPLv2
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -83,8 +83,11 @@ Patch34: ruby-1.8.6-simplify-openssl-dig
Patch35: ruby_1_8_7-gc-open4_096segv.patch
#
# Patch36, 37: needed to use the head of ext/tk directory of ruby_1_8 branch head
-# Patch36: taken from ruby_1_8 branch
-Patch36: ruby-1.8.x-RHASH_SIZE-def.patch
+# Patch36: taken from ruby_1_8 branch, RHASH_SIZE definition is needed
+# for ruby_1_8 head ext/tk
+# With this change, rb_hash_lookup becomes also needed for rubygem-nokogiri
+# (bug 592936)
+Patch36: ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch
# Patch37: flatten(level) feature is in >= 1.8.7, reverting
Patch37: ruby-1.8.x-ext_tk-flatten-level-revert.patch
# From ruby_1_8 branch: bz 530407
@@ -634,6 +637,10 @@ rm -rf $RPM_BUILD_ROOT
%{_emacs_sitestartdir}/ruby-mode-init.el
%changelog
+* Mon May 17 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-4
+- Patch36 (ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch)
+ also backport rb_hash_lookup definition (bug 592936)
+
* Thu May 13 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-3
- ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407)
- Recreate some patches using upstream svn when available, and
--- ruby-1.8.x-RHASH_SIZE-def.patch DELETED ---
More information about the scm-commits
mailing list