/[guile]/guile/guile-core/libguile/gh_data.c
ViewVC logotype

Diff of /guile/guile-core/libguile/gh_data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.68 by dirk, Fri Mar 1 00:19:20 2002 UTC revision 1.69 by xxhanwen, Sat Jul 20 14:08:33 2002 UTC
# Line 122  gh_ints2scm (const int *d, long n) Line 122  gh_ints2scm (const int *d, long n)
122  {  {
123    long i;    long i;
124    SCM v = scm_c_make_vector (n, SCM_UNSPECIFIED);    SCM v = scm_c_make_vector (n, SCM_UNSPECIFIED);
   SCM *velts = SCM_VELTS(v);  
   
125    for (i = 0; i < n; ++i)    for (i = 0; i < n; ++i)
126      velts[i] = (SCM_FIXABLE (d[i]) ? SCM_MAKINUM (d[i]) : scm_i_long2big (d[i]));      SCM_VECTOR_SET (v, i, (SCM_FIXABLE (d[i]) ? SCM_MAKINUM (d[i]) : scm_i_long2big (d[i])));
127    
128    return v;    return v;
129  }  }
# Line 135  gh_doubles2scm (const double *d, long n) Line 133  gh_doubles2scm (const double *d, long n)
133  {  {
134    long i;    long i;
135    SCM v = scm_c_make_vector (n, SCM_UNSPECIFIED);    SCM v = scm_c_make_vector (n, SCM_UNSPECIFIED);
   SCM *velts = SCM_VELTS(v);  
136    
137    for(i = 0; i < n; i++)    for(i = 0; i < n; i++)
138      velts[i] = scm_make_real (d[i]);      SCM_VECTOR_SET (v, i, scm_make_real (d[i]));
139    return v;    return v;
140  }  }
141    

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26