mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
* gh_data.c: fix various preprocessor usages of new public
symbols to expect 0 or 1 values rather than 1 or undefined. i.e. change #ifdef to #if, etc.
This commit is contained in:
parent
2d82b1822f
commit
a5843d4411
1 changed files with 7 additions and 7 deletions
|
@ -143,7 +143,7 @@ gh_doubles2scm (const double *d, long n)
|
|||
return v;
|
||||
}
|
||||
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
/* Do not use this function for building normal Scheme vectors, unless
|
||||
you arrange for the elements to be protected from GC while you
|
||||
initialize the vector. */
|
||||
|
@ -272,7 +272,7 @@ gh_scm2chars (SCM obj, char *m)
|
|||
for (i = 0; i < n; ++i)
|
||||
m[i] = SCM_INUM (SCM_VELTS (obj)[i]);
|
||||
break;
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
case scm_tc7_byvect:
|
||||
n = SCM_UVECTOR_LENGTH (obj);
|
||||
if (m == 0)
|
||||
|
@ -331,7 +331,7 @@ gh_scm2shorts (SCM obj, short *m)
|
|||
for (i = 0; i < n; ++i)
|
||||
m[i] = SCM_INUM (SCM_VELTS (obj)[i]);
|
||||
break;
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
case scm_tc7_svect:
|
||||
n = SCM_UVECTOR_LENGTH (obj);
|
||||
if (m == 0)
|
||||
|
@ -380,7 +380,7 @@ gh_scm2longs (SCM obj, long *m)
|
|||
: scm_num2long (val, 0, NULL);
|
||||
}
|
||||
break;
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
case scm_tc7_ivect:
|
||||
case scm_tc7_uvect:
|
||||
n = SCM_UVECTOR_LENGTH (obj);
|
||||
|
@ -434,7 +434,7 @@ gh_scm2floats (SCM obj, float *m)
|
|||
m[i] = SCM_REAL_VALUE (val);
|
||||
}
|
||||
break;
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
case scm_tc7_fvect:
|
||||
n = SCM_UVECTOR_LENGTH (obj);
|
||||
if (m == 0)
|
||||
|
@ -497,7 +497,7 @@ gh_scm2doubles (SCM obj, double *m)
|
|||
m[i] = SCM_REAL_VALUE (val);
|
||||
}
|
||||
break;
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
case scm_tc7_fvect:
|
||||
n = SCM_UVECTOR_LENGTH (obj);
|
||||
if (m == 0)
|
||||
|
@ -652,7 +652,7 @@ gh_vector_length (SCM v)
|
|||
return (unsigned long) SCM_VECTOR_LENGTH (v);
|
||||
}
|
||||
|
||||
#ifdef SCM_HAVE_ARRAYS
|
||||
#if SCM_HAVE_ARRAYS
|
||||
/* uniform vector support */
|
||||
|
||||
/* returns the length as a C unsigned long integer */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue