From 57fc01bb2d6823eaa1f866c4d6bd7f4a70eee74f Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Sat, 21 Dec 2002 00:22:49 +0100 Subject: * gmp-impl.h (gmp_allocated_string): Hold length in a field. * cxx/osdoprnti.cc, cxx/osmpf.cc: Use this. --- cxx/osdoprnti.cc | 4 ++-- cxx/osmpf.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cxx') diff --git a/cxx/osdoprnti.cc b/cxx/osdoprnti.cc index e762d4e37..fefb060c5 100644 --- a/cxx/osdoprnti.cc +++ b/cxx/osdoprnti.cc @@ -56,6 +56,6 @@ __gmp_doprnt_integer_ostream (ostream &o, struct doprnt_params_t *p, __gmp_asprintf_final (&d); (*__gmp_free_func) (s, strlen(s)+1); - gmp_allocated_string alloc = result; - return o.write (result, strlen (result)); + gmp_allocated_string t (result); + return o.write (t.str, t.len); } diff --git a/cxx/osmpf.cc b/cxx/osmpf.cc index 767f0907d..6aa2cc9cb 100644 --- a/cxx/osmpf.cc +++ b/cxx/osmpf.cc @@ -57,6 +57,6 @@ operator<< (ostream &o, mpf_srcptr f) ASSERT (ret != -1); __gmp_asprintf_final (&d); - gmp_allocated_string alloc = result; - return o.write (result, strlen (result)); + gmp_allocated_string t (result); + return o.write (t.str, t.len); } -- cgit v1.2.1