1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +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:
Rob Browning 2003-03-27 20:08:25 +00:00
parent 2d82b1822f
commit a5843d4411

View file

@ -143,7 +143,7 @@ gh_doubles2scm (const double *d, long n)
return v; return v;
} }
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
/* Do not use this function for building normal Scheme vectors, unless /* Do not use this function for building normal Scheme vectors, unless
you arrange for the elements to be protected from GC while you you arrange for the elements to be protected from GC while you
initialize the vector. */ initialize the vector. */
@ -272,7 +272,7 @@ gh_scm2chars (SCM obj, char *m)
for (i = 0; i < n; ++i) for (i = 0; i < n; ++i)
m[i] = SCM_INUM (SCM_VELTS (obj)[i]); m[i] = SCM_INUM (SCM_VELTS (obj)[i]);
break; break;
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
case scm_tc7_byvect: case scm_tc7_byvect:
n = SCM_UVECTOR_LENGTH (obj); n = SCM_UVECTOR_LENGTH (obj);
if (m == 0) if (m == 0)
@ -331,7 +331,7 @@ gh_scm2shorts (SCM obj, short *m)
for (i = 0; i < n; ++i) for (i = 0; i < n; ++i)
m[i] = SCM_INUM (SCM_VELTS (obj)[i]); m[i] = SCM_INUM (SCM_VELTS (obj)[i]);
break; break;
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
case scm_tc7_svect: case scm_tc7_svect:
n = SCM_UVECTOR_LENGTH (obj); n = SCM_UVECTOR_LENGTH (obj);
if (m == 0) if (m == 0)
@ -380,7 +380,7 @@ gh_scm2longs (SCM obj, long *m)
: scm_num2long (val, 0, NULL); : scm_num2long (val, 0, NULL);
} }
break; break;
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
case scm_tc7_ivect: case scm_tc7_ivect:
case scm_tc7_uvect: case scm_tc7_uvect:
n = SCM_UVECTOR_LENGTH (obj); n = SCM_UVECTOR_LENGTH (obj);
@ -434,7 +434,7 @@ gh_scm2floats (SCM obj, float *m)
m[i] = SCM_REAL_VALUE (val); m[i] = SCM_REAL_VALUE (val);
} }
break; break;
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
case scm_tc7_fvect: case scm_tc7_fvect:
n = SCM_UVECTOR_LENGTH (obj); n = SCM_UVECTOR_LENGTH (obj);
if (m == 0) if (m == 0)
@ -497,7 +497,7 @@ gh_scm2doubles (SCM obj, double *m)
m[i] = SCM_REAL_VALUE (val); m[i] = SCM_REAL_VALUE (val);
} }
break; break;
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
case scm_tc7_fvect: case scm_tc7_fvect:
n = SCM_UVECTOR_LENGTH (obj); n = SCM_UVECTOR_LENGTH (obj);
if (m == 0) if (m == 0)
@ -652,7 +652,7 @@ gh_vector_length (SCM v)
return (unsigned long) SCM_VECTOR_LENGTH (v); return (unsigned long) SCM_VECTOR_LENGTH (v);
} }
#ifdef SCM_HAVE_ARRAYS #if SCM_HAVE_ARRAYS
/* uniform vector support */ /* uniform vector support */
/* returns the length as a C unsigned long integer */ /* returns the length as a C unsigned long integer */