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-ccalls/c-calls.h
ViewVC logotype

View of /sml/trunk/src/runtime/c-libs/smlnj-ccalls/c-calls.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (download) (as text) (annotate)
Sat Oct 4 23:33:09 1997 UTC (22 years, 11 months ago) by monnier
File size: 939 byte(s)
Initial revision
/* c-calls.h 
 *
 * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
 *
 */

#ifndef _C_CALLS_
#define _C_CALLS_

#define N_ARGS 15 /* max number of args a ML callable C function may have */

#ifndef _ASM_

#include "ml-sizes.h"

/* malloc's should return sufficiently aligned blocks */
#define HAS_ALIGNED_MALLOC
#if defined(HAS_ALIGNED_MALLOC)
#include <stdlib.h>
#include <malloc.h>

#define memalign(align,sz) malloc(sz)
#endif

#include <string.h>

extern Word_t *checked_memalign(int n,int align);
#define checked_alloc(n) checked_memalign((n),(1))

extern Word_t mk_C_function(ml_state_t *msp,
			    ml_val_t f,
			    int nargs,char *argtypes[],char *rettype);

extern ml_val_t datumCtoML(ml_state_t *msp,char *type,Word_t p,ml_val_t *root);
extern int datumMLtoC(ml_state_t *msp,char **t,Word_t **p,ml_val_t ret);
extern ml_val_t revMLList(ml_val_t l,ml_val_t acc);

extern ml_state_t *visible_msp;
#endif

#endif /* !_C_CALLS_ */


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