This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
> SCM GuileCoordinateAdd(SCM scm_coordinate, SCM rest_coordinates) > { > Coordinate * coordinate = (Coordinate *) SCM_CDR(scm_coordinate); > Coordinate result = *coordinate; > SCM scm_result; > > while(rest_coordinates != SCM_EOL) > { > Coordinate * arg = (Coordinate *) SCM_CDR(SCM_CAR(rest_coordinates)); > result = result + *arg; > rest_coordinates = SCM_CDR(rest_coordinates); > } > > SCM_NEWCELL(SCM scm_result); > SCM_SETCDR(scm_result, new Coordinate(result)); > SCM_SETCAR(scm_result, type_tag); > > return scm_result; > } Shouldn't that line read SCM_NEWCELL (scm_result); ?