[coccinelle] Remember to include the patch.
Richard W.M. Jones
rjones at fedoraproject.org
Mon Jul 25 12:53:55 UTC 2011
commit ea4fb18700fc0323c71ffeab488b2f2d5ae5c0a7
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Jul 25 13:53:37 2011 +0100
Remember to include the patch.
...e-1.0.0-rc4-remove-use-of-hashtbl_of_sexp.patch | 42 ++++++++++++++++++++
coccinelle.spec | 4 +-
2 files changed, 44 insertions(+), 2 deletions(-)
---
diff --git a/coccinelle-1.0.0-rc4-remove-use-of-hashtbl_of_sexp.patch b/coccinelle-1.0.0-rc4-remove-use-of-hashtbl_of_sexp.patch
new file mode 100644
index 0000000..44652f6
--- /dev/null
+++ b/coccinelle-1.0.0-rc4-remove-use-of-hashtbl_of_sexp.patch
@@ -0,0 +1,42 @@
+diff -ur coccinelle-1.0.0-rc4.old/commons/sexp_common.ml coccinelle-1.0.0-rc4/commons/sexp_common.ml
+--- coccinelle-1.0.0-rc4.old/commons/sexp_common.ml 2011-03-28 09:04:18.000000000 +0100
++++ coccinelle-1.0.0-rc4/commons/sexp_common.ml 2011-07-25 13:43:48.980408399 +0100
+@@ -279,11 +279,28 @@
+ | Pb v1 ->
+ let v1 = Conv.sexp_of_string v1 in Sexp.List [ Sexp.Atom "Pb"; v1 ]
+
++let hashtbl_of_sexp key_of_sexp val_of_sexp sexp = match sexp with
++ | Sexp.List lst ->
++ let htbl = Hashtbl.create 0 in
++ let act = function
++ | Sexp.List [k_sexp; v_sexp] ->
++ Hashtbl.add htbl (key_of_sexp k_sexp) (val_of_sexp v_sexp)
++ | Sexp.List _ | Sexp.Atom _ ->
++ Conv.of_sexp_error "hashtbl_of_sexp: tuple list needed" sexp
++ in
++ List.iter act lst;
++ htbl
++ | Sexp.Atom _ -> Conv.of_sexp_error "hashtbl_of_sexp: list needed" sexp
++
++let sexp_of_hashtbl sexp_of_key sexp_of_val htbl =
++ let coll k v acc = Sexp.List [sexp_of_key k; sexp_of_val v] :: acc in
++ Sexp.List (Hashtbl.fold coll htbl [])
++
+ let score_of_sexp__ =
+ let _loc = "Xxx.score"
+ in
+ fun sexp ->
+- Conv.hashtbl_of_sexp Conv.string_of_sexp score_result_of_sexp sexp
++ hashtbl_of_sexp Conv.string_of_sexp score_result_of_sexp sexp
+
+ let score_of_sexp sexp =
+ try score_of_sexp__ sexp
+@@ -291,7 +308,7 @@
+ | Conv_error.No_variant_match ((msg, sexp)) -> Conv.of_sexp_error msg sexp
+
+ let sexp_of_score v =
+- Conv.sexp_of_hashtbl Conv.sexp_of_string sexp_of_score_result v
++ sexp_of_hashtbl Conv.sexp_of_string sexp_of_score_result v
+
+
+ let score_list_of_sexp__ =
diff --git a/coccinelle.spec b/coccinelle.spec
index f60919f..cc54f47 100644
--- a/coccinelle.spec
+++ b/coccinelle.spec
@@ -8,7 +8,7 @@
Name: coccinelle
Version: 1.0.0
-Release: 0.rc4.1%{?dist}
+Release: 0.rc4.2%{?dist}
Summary: Semantic patching for Linux (spatch)
Group: Development/Libraries
@@ -164,7 +164,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Mon Jul 25 2011 Richard W.M. Jones <rjones at redhat.com> - 1.0.0-0.rc4.1
+* Mon Jul 25 2011 Richard W.M. Jones <rjones at redhat.com> - 1.0.0-0.rc4.2
- Update to 1.0.0-rc4.
- Requires ocaml-findlib (RHBZ#725415).
- Non-upstream patch to remove use of a couple of functions from the
More information about the scm-commits
mailing list