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 (23 years 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 */
#include <stdlib.h>
#include <malloc.h>

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

#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 /* !_C_CALLS_ */

ViewVC Help
Powered by ViewVC 1.0.0