Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/runtime/c-libs/smlnj-runtime/record-concat.c
ViewVC logotype

View of /sml/trunk/src/runtime/c-libs/smlnj-runtime/record-concat.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 250 - (download) (as text) (annotate)
Sat Apr 17 18:57:03 1999 UTC (21 years, 4 months ago) by monnier
File size: 753 byte(s)
This commit was generated by cvs2svn to compensate for changes in r249,
which included commits to RCS files with non-trunk default branches.
/* record-concat.c
 *
 * COPYRIGHT (c) 1998 Bell Labs, Lucent Technologies.
 *
 * Concatenation for records.
 */


#include "ml-base.h"
#include "ml-values.h"
#include "ml-state.h"
#include "ml-objects.h"
#include "gc.h"
#include "cfun-proto-list.h"
#include "ml-c.h"



/* _ml_RunT_recordconcat : (object * object) -> object
 *
 */
ml_val_t _ml_RunT_recordconcat (ml_state_t *msp, ml_val_t arg)
{
    ml_val_t    r1 = REC_SEL(arg,0);
    ml_val_t    r2 = REC_SEL(arg,1);

    if (r1 == ML_unit)
	return r2;
    else if (r2 == ML_unit)
	return r1;
    else {
	ml_val_t	res = RecordConcat (msp, r1, r2);

	if (res == ML_unit)
	    return RAISE_ERROR(msp, "recordconcat: not a record");
	else
	    return res;
    }

} /* end of _ml_RunT_recordconcat */


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0