diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-12-21 00:22:49 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-12-21 00:22:49 +0100 |
commit | 57fc01bb2d6823eaa1f866c4d6bd7f4a70eee74f (patch) | |
tree | 57c3fc4a0d8b419a274cd638599dc479d3284ce7 /cxx | |
parent | 242320dbf86e32f4aead4316107ef21cf1596d08 (diff) | |
download | gmp-57fc01bb2d6823eaa1f866c4d6bd7f4a70eee74f.tar.gz |
* gmp-impl.h (gmp_allocated_string): Hold length in a field.
* cxx/osdoprnti.cc, cxx/osmpf.cc: Use this.
Diffstat (limited to 'cxx')
-rw-r--r-- | cxx/osdoprnti.cc | 4 | ||||
-rw-r--r-- | cxx/osmpf.cc | 4 |
2 files changed, 4 insertions, 4 deletions
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); } |