search for: to_string

Displaying 20 results from an estimated 295 matches for "to_string".

2017 May 17
2
Can we start using std::to_string?
Hi all, I tried to use std::to_string somewhere and one of the bots yelled at me [1] because it couldn't find it. Searching through the mailing lists reveals a long stream of fixup patches trying to avoid std::to_string, but there are uses of it in tree in the AVR and Hexagon backends, libFuzzer and the Gold plugin. I can only ima...
2017 May 17
2
Can we start using std::to_string?
I'm fairly sure the problem is that we still support building with gcc 4.8.x, and that version of gcc did not have std::to_string. It is not just an NDK issue. -Hal On 05/17/2017 06:05 AM, Pavel Labath via llvm-dev wrote: > Hi Diana, > > I am responsible for that bot, and probably a great number of those fixups. > > The root of the problem is that android NDK comes with a libstdc++ > which does not hav...
2011 Oct 12
0
[LLVMdev] Integer to string
...o do is to replicate a function several times and append a sequence number to each replica's name. > > Thanks ahead, > Pablo This doesn't really answer your question. Instead I offer information to the llvm community: C++ 11 offers these new functions in <string>: string to_string(int val); string to_string(unsigned val); string to_string(long val); string to_string(unsigned long val); string to_string(long long val); string to_string(unsigned long long val); string to_string(float val); string to_string(double val); string to_string(long double val); The only place I know...
2015 Nov 28
2
Need help with windows build error and std::to_string
I need to build a Twine with a double value, so I was using std::to_string, but I'm getting "error: 'to_string' is not a member of 'std'" from a windows buildbot. What's the canonical way to create a Twine() out of a double? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org...
2011 Oct 12
6
[LLVMdev] Integer to string
Hi, I need to convert an integer into a string. I would normally do that in C++ by using the StringStream class, but the LLVM coding standards discourage using that class. The same coding standards suggest to use llvm:StringStream instead, but I cannot find that class anywhere; furthermore, the header file where it was supposed to be (according to the coding standards) doesn't even exist. Is
2015 Nov 28
2
Need help with windows build error and std::to_string
...anks. I On Sat, Nov 28, 2015 at 11:44 AM, Benjamin Kramer <benny.kra at gmail.com> wrote: > On Sat, Nov 28, 2015 at 5:14 PM, Diego Novillo via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > > I need to build a Twine with a double value, so I was using > std::to_string, > > but I'm getting "error: 'to_string' is not a member of 'std'" from a > windows > > buildbot. What's the canonical way to create a Twine() out of a double? > > via raw_ostream. Create a new raw_string_ostream or > raw_svector_ostream, &...
2014 Jan 15
0
[PATCH 4/4] hivex: python: Get rid of to_string function in test script
...t_value (b, value1) value1 = { "key": "Key1", "t": 3, "value": "JKL" } h.node_set_value (b, value1) -# In Python2, the data is returned as a string. In Python3, it is -# returned as bytes. Provide a function to convert either to a string. -def to_string (data): - if sys.version_info[0] == 2: - return data - else: - return str (data, "utf-8") - val = h.node_get_value (b, "Key1") t_data = h.value_value (val) assert t_data[0] == 3 -assert to_string (t_data[1]) == "JKL" +assert t_data[1] == "JK...
2019 Jun 27
0
Re: [PATCH 08/11] Rust bindings: Fix memory management and format the file
...nsafe { ffi::CStr::from_ptr(key) }.to_str().unwrap(); - let val = unsafe { ffi::CStr::from_ptr(val) }.to_str().unwrap(); + let key = unsafe { ffi::CStr::from_ptr(key) }.to_str()?; + let val = unsafe { ffi::CStr::from_ptr(val) }.to_str()?; map.insert(key.to_string(), val.to_string()); } else { + // Internal Error -> panic panic!(\"odd number of items in hash table\"); } } - map + Ok(map) } -fn struct_list<T, S: convert::From<*const T>>(l: *const *const T) -> Vec<S> { +fn...
2006 Jul 14
3
override to_string for single attribute?
...re I want to change the display for a single attribute such that if the value is an integer, it displays with no decimal point (e.g. "1"), but if it is non-integer, it displays with a decimal point (e.g. "1.25"). The easiest way to do this seems to be if I could override the to_string method for my_model.my_attribute.to_s. Is there a way to do this? Or a better way altogether? thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
...er = NullTerminatedIter::new(l); + while let Some(key) = iter.next() { + if let Some(val) = iter.next() { + let key = unsafe { ffi::CStr::from_ptr(key) }.to_str().unwrap(); + let val = unsafe { ffi::CStr::from_ptr(val) }.to_str().unwrap(); + map.insert(key.to_string(), val.to_string()); + } else { + panic!(\"odd number of items in hash table\"); + } + } + map +} + +fn struct_list<T, S: convert::From<*const T>>(l: *const *const T) -> Vec<S> { + let mut v = Vec::new(); + for x in NullTerminatedI...
2016 Jul 06
3
GCC prerequisites for building LLVM head?
Is there is minimum required version for GCC to build LLVM from the head revision? I have GCC v4.9.3, but 'Tools/sancov/sancov.cc' won't build because 'std::to_string' does not exist. When running CMake it did not flag GCC v4.9.3 as too old, and it is passing the '-std=gnu++11' option, but apparently this version of GCC is not fully C++ 11 compliant, or at least its C++ library isn't. Everything else builds. Thanks, Marti...
2019 Jun 27
4
Re: [PATCH 9/9] Rust bindings: Complete bindings
Patch 9 is a kind of dumping ground of all kinds of stuff. It may be better to spend some time with git rebase -i trying to work this into more coherent patches. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live
2019 Jun 27
0
[PATCH 9/9] Rust bindings: Complete bindings
...nsafe { ffi::CStr::from_ptr(key) }.to_str().unwrap(); - let val = unsafe { ffi::CStr::from_ptr(val) }.to_str().unwrap(); + let key = unsafe { ffi::CStr::from_ptr(key) }.to_str()?; + let val = unsafe { ffi::CStr::from_ptr(val) }.to_str()?; map.insert(key.to_string(), val.to_string()); } else { + // Internal Error -> panic panic!(\"odd number of items in hash table\"); } } - map + Ok(map) } -fn struct_list<T, S: convert::From<*const T>>(l: *const RawList<T>) -> Vec<S&...
2015 Oct 06
1
[PATCH] builder: Remove duplicate planner transition.
...*) - else if output_size > old_size && is_not `Template && List.mem_assoc `Format itags then ( + else if output_size > old_size && is_not `Template + && List.mem_assoc `Format itags then tr `Disk_resize 60 ((`Size, Int64.to_string output_size) :: itags); - tr `Disk_resize 60 ((`Size, Int64.to_string output_size) :: itags); - ); (* qemu-img convert is always possible, and quicker. It doesn't * resize, but it does change the format. -- 2.5.0
2016 Jun 15
3
[PATCH 2/3] Convert source so it can be compiled with OCaml '-safe-string' option.
OCaml 4.02 introduced the 'bytes' type, a mutable string intended to replace the existing 'string' type for those cases where the byte array can be mutated. In future the 'string' type will become immutable. This is not the default now, but it can be forced using the '-safe-string' compile option. I tested this on Fedora 24 (OCaml 4.02) & RHEL 7 (OCaml 4.01).
2008 Jun 18
1
Vpim gem
On Wed, Jun 18, 2008 at 6:32 AM, Joost Hietbrink <joost at joopp.com> wrote: > Hi Sam Roberts, > First of all. Thanks for the Vpim gem. We use it at www.yelloyello.com and > it works great. I''m glad to hear that. > We''ve only encountered the following error: > # NoMethodError (undefined method `to_str'' for []:Array): > # >
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...N_LEVEL i -> "VIR_ERR_LEVEL_" ^ string_of_int i + + type t = { + code : code; + domain : domain; + message : string option; + level : level; + str1 : string option; + str2 : string option; + str3 : string option; + int1 : int32; + int2 : int32; + } + + let to_string { code = code; domain = domain; message = message } = + let buf = Buffer.create 128 in + Buffer.add_string buf "libvirt: "; + Buffer.add_string buf (string_of_code code); + Buffer.add_string buf ": "; + Buffer.add_string buf (string_of_domain domain); + Buffer....
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
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |
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 +++++++++++++++++++