search for: black_list

Displaying 15 results from an estimated 15 matches for "black_list".

2018 Feb 08
7
How to ensure thread-safety
Hi, I have read the concurrency webpage from the Xapian documentation: http://getting-started-with-xapian.readthedocs.io/en/latest/concepts/concurrency.html But it is still not clear to me how to ensure thread-safety when using libxapian (C++ API). Usually when doing multi-threading many threads can read the same variable concurrently without locking provided none of the threads modifies the
2019 Jul 29
0
Re: [PATCH] Rust bindings: Add Rust bindings
...ng.nsplit, and currying: > > let snake2caml name = > let l = String.nsplit "_" name in > let l = List.map String.capitalize_ascii l in > String.concat "" l > > > +(* because there is a function which contains 'unsafe' field *) > > +let black_list = ["unsafe"] > > + > > +let translate_bad_symbols s = > > + if List.exists (fun x -> s = x) black_list then > > + s ^ "_" > > + else > > + s > > Hm IMHO the condition in the if sounds like List.mem :) What about: > > i...
2019 Jun 27
0
[PATCH 5/9] Rust bindings: Add generator of structs for optional arguments
..._char c = Str.split (Str.regexp (String.make 1 c)) + +let snake2caml name = + let l = split_on_char '_' name in + let l = List.map (fun x -> String.capitalize_ascii x) l in + String.concat "" l + + +(* because there is a function which contains 'unsafe' field *) +let black_list = ["unsafe"] + +let translate_bad_symbols s = + if List.exists (fun x -> s = x) black_list then + s ^ "_" + else + s + let generate_rust () = generate_header CStyle LGPLv2plus; @@ -204,3 +226,52 @@ impl UUID { pr " }\n"; pr "}\n&q...
2018 Apr 08
0
core dumped when using MatchAll in multi-threads
...In some case, we use Xapian::Query::MatchAll to create the query, but it always has Segmentation fault (core dumped). It looks like some pointers are double freed. This is the function that we use to create xapian-query. std::shared_ptr<Xapian::Query> constructQuery() { Xapian::Query black_list("BLt1"); return std::make_shared<Xapian::Query>(Xapian::Query::OP_AND_NOT, Xapian::Query::MatchAll, black_list); } I have wrote a demo to reproduce our problems, you can click this link for the detail. https://github.com/xiangqianzsh/xapian_leaning/tree/master/matchall_cored...
2019 Jul 26
4
Re: [PATCH] Rust bindings: Add Rust bindings
...his can be simplified a bit using String.nsplit, and currying: let snake2caml name = let l = String.nsplit "_" name in let l = List.map String.capitalize_ascii l in String.concat "" l > +(* because there is a function which contains 'unsafe' field *) > +let black_list = ["unsafe"] > + > +let translate_bad_symbols s = > + if List.exists (fun x -> s = x) black_list then > + s ^ "_" > + else > + s Hm IMHO the condition in the if sounds like List.mem :) What about: if List.mem s black_list then > + let cn...
2019 Jul 17
0
Re: [PATCH] Rust bindings: Add Rust bindings
...p (String.make 1 c)) >+ >+let snake2caml name = >+ let l = split_on_char '_' name in >+ let l = List.map (fun x -> String.capitalize_ascii x) l in >+ String.concat "" l >+ >+(* because there is a function which contains 'unsafe' field *) >+let black_list = ["unsafe"] >+ >+let translate_bad_symbols s = >+ if List.exists (fun x -> s = x) black_list then >+ s ^ "_" >+ else >+ s >+ >+let generate_rust () = >+ generate_header CStyle LGPLv2plus; >+ >+ pr " I started with this as well...
2019 Jul 17
2
[PATCH] Rust bindings: Add Rust bindings
...on_char c = Str.split (Str.regexp (String.make 1 c)) + +let snake2caml name = + let l = split_on_char '_' name in + let l = List.map (fun x -> String.capitalize_ascii x) l in + String.concat "" l + +(* because there is a function which contains 'unsafe' field *) +let black_list = ["unsafe"] + +let translate_bad_symbols s = + if List.exists (fun x -> s = x) black_list then + s ^ "_" + else + s + +let generate_rust () = + generate_header CStyle LGPLv2plus; + + pr " +use std::collections; +use std::convert; +use std::convert::TryFrom; +u...
2019 Jul 23
2
Re: [PATCH] Rust bindings: Add Rust bindings
...g.make 1 c)) > + > +let snake2caml name = > + let l = split_on_char '_' name in > + let l = List.map (fun x -> String.capitalize_ascii x) l in > + String.concat "" l > + > +(* because there is a function which contains 'unsafe' field *) > +let black_list = ["unsafe"] > + > +let translate_bad_symbols s = > + if List.exists (fun x -> s = x) black_list then > + s ^ "_" > + else > + s > + > +let generate_rust () = > + generate_header CStyle LGPLv2plus; > + > + pr " > +use crate::...
2019 Jul 20
2
Re: [PATCH] Rust bindings: Add Rust bindings
...;+let snake2caml name = > >+ let l = split_on_char '_' name in > >+ let l = List.map (fun x -> String.capitalize_ascii x) l in > >+ String.concat "" l > >+ > >+(* because there is a function which contains 'unsafe' field *) > >+let black_list = ["unsafe"] > >+ > >+let translate_bad_symbols s = > >+ if List.exists (fun x -> s = x) black_list then > >+ s ^ "_" > >+ else > >+ s > >+ > >+let generate_rust () = > >+ generate_header CStyle LGPLv2plus; > &...
2019 Jul 20
0
[PATCH] Rust bindings: Add Rust bindings
...on_char c = Str.split (Str.regexp (String.make 1 c)) + +let snake2caml name = + let l = split_on_char '_' name in + let l = List.map (fun x -> String.capitalize_ascii x) l in + String.concat "" l + +(* because there is a function which contains 'unsafe' field *) +let black_list = ["unsafe"] + +let translate_bad_symbols s = + if List.exists (fun x -> s = x) black_list then + s ^ "_" + else + s + +let generate_rust () = + generate_header CStyle LGPLv2plus; + + pr " +use crate::base::*; +use crate::utils::*; +use crate::error::*; +use st...
2019 Jul 23
0
Re: [PATCH] Rust bindings: Add Rust bindings
...on_char c = Str.split (Str.regexp (String.make 1 c)) + +let snake2caml name = + let l = split_on_char '_' name in + let l = List.map (fun x -> String.capitalize_ascii x) l in + String.concat "" l + +(* because there is a function which contains 'unsafe' field *) +let black_list = ["unsafe"] + +let translate_bad_symbols s = + if List.exists (fun x -> s = x) black_list then + s ^ "_" + else + s + +let generate_rust () = + generate_header CStyle LGPLv2plus; + + pr " +use crate::base::*; +use crate::utils::*; +use crate::error::*; +use st...
2019 Jun 27
16
[PATCH 1/9] Rust bindings: Add Rust bindings
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com> --- Makefile.am | 4 ++++ configure.ac | 3 +++ generator/Makefile.am | 3 +++ generator/bindtests.ml | 3 +++ generator/bindtests.mli | 1 + generator/main.ml | 5 +++++ generator/rust.ml | 34 ++++++++++++++++++++++++++++++++++ generator/rust.mli | 19 +++++++++++++++++++
2019 Jul 08
2
Re: [PATCH] Add Rust bindings
On Mon, Jul 08, 2019 at 10:04:57AM +0100, Richard W.M. Jones wrote: >On Mon, Jul 08, 2019 at 10:49:55AM +0200, Martin Kletzander wrote: >> On Mon, Jul 08, 2019 at 10:10:10AM +0200, Pino Toscano wrote: >> >On Saturday, 6 July 2019 13:03:24 CEST Martin Kletzander wrote: >> >>Just one thing, the Cargo.toml includes a version under which the crate would be >>
2019 Jul 29
1
Re: [PATCH] Rust bindings: Add Rust bindings
...x > 0 -> pr " "; indent (x - 1) + | _ -> () + +let snake2caml name = + let l = String.nsplit "_" name in + let l = List.map String.capitalize_ascii l in + String.concat "" l + +(* because there is a function which contains 'unsafe' field *) +let black_list = ["unsafe"] + +let translate_bad_symbols s = + if List.mem s black_list then + s ^ "_" + else + s + +let generate_rust () = + generate_header ~copywrites:copywrites CStyle LGPLv2plus; + + pr " +use crate::base::*; +use crate::utils::*; +use crate::error::*; +use...
2019 Jul 02
16
[PATCH] Add Rust bindings
I fixed the patch I submitted before based on comments, and there are some commits which are merged or divided. So, I will re-send all the patches. Regards, Hiroyuki Katsura