mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Only define scm_from_complex_double if it will
actually be used.
This commit is contained in:
parent
6180e336b2
commit
bca69a9fba
3 changed files with 10 additions and 2 deletions
1
NEWS
1
NEWS
|
@ -51,6 +51,7 @@ would trigger an unbound variable error for `match:andmap'.
|
|||
** Fixed build issues on NetBSD 1.6
|
||||
** Fixed build issue on Solaris 2.10 x86_64
|
||||
** Fixed build issue with DEC/Compaq/HP's compiler
|
||||
** Fixed scm_from_complex_double build issue on FreeBSD
|
||||
|
||||
* Changes to the distribution
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-03-09 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* numbers.c: Only define scm_from_complex_double if it will
|
||||
actually be used.
|
||||
|
||||
2008-03-08 Julian Graham <joolean@gmail.com>
|
||||
|
||||
* threads.c (scm_join_thread_timed, scm_thread_p,
|
||||
|
|
|
@ -163,20 +163,22 @@ xisnan (double x)
|
|||
}
|
||||
|
||||
#if defined (GUILE_I)
|
||||
#if HAVE_COMPLEX_DOUBLE
|
||||
|
||||
/* For an SCM object Z which is a complex number (ie. satisfies
|
||||
SCM_COMPLEXP), return its value as a C level "complex double". */
|
||||
#define SCM_COMPLEX_VALUE(z) \
|
||||
(SCM_COMPLEX_REAL (z) + GUILE_I * SCM_COMPLEX_IMAG (z))
|
||||
#endif
|
||||
|
||||
/* Convert a C "complex double" to an SCM value. */
|
||||
#if HAVE_COMPLEX_DOUBLE
|
||||
static SCM
|
||||
scm_from_complex_double (complex double z)
|
||||
{
|
||||
return scm_c_make_rectangular (creal (z), cimag (z));
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPLEX_DOUBLE */
|
||||
#endif /* GUILE_I */
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue