doc: Use scm_{to,from}_double instead of old API in example.
authorLudovic Courtès <ludo@gnu.org>
Mon, 3 Sep 2012 20:35:33 +0000 (22:35 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 3 Sep 2012 20:35:33 +0000 (22:35 +0200)
Fixed <http://bugs.gnu.org/12241>.
Reported by Kurt W. Gochko <kgochko@comcast.net>.

* doc/ref/tour.texi (Writing Guile Extensions): Change example to use
  scm_{to,from}_double instead of the pre-1.8 API.

doc/ref/tour.texi

index 3e61269..0924216 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2010, 2011
-@c   Free Software Foundation, Inc.
+@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2010, 2011,
+@c   2012 Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
 @raisesections
@@ -149,7 +149,7 @@ that makes the @code{j0} function available to Scheme code.
 SCM
 j0_wrapper (SCM x)
 @{
-  return scm_make_real (j0 (scm_num2dbl (x, "j0")));
+  return scm_from_double (j0 (scm_to_double (x)));
 @}
 
 void