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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/c-libs/smlnj-ccalls/c-calls.h
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download) (as text)

1 : monnier 2 /* c-calls.h
2 :     *
3 :     * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
4 :     *
5 :     */
6 :    
7 :     #ifndef _C_CALLS_
8 :     #define _C_CALLS_
9 :    
10 :     #define N_ARGS 15 /* max number of args a ML callable C function may have */
11 :    
12 :     #ifndef _ASM_
13 :    
14 :     #include "ml-sizes.h"
15 :    
16 :     /* malloc's should return sufficiently aligned blocks */
17 :     #define HAS_ALIGNED_MALLOC
18 :     #if defined(HAS_ALIGNED_MALLOC)
19 :     #include <stdlib.h>
20 :     #include <malloc.h>
21 :    
22 :     #define memalign(align,sz) malloc(sz)
23 :     #endif
24 :    
25 :     #include <string.h>
26 :    
27 :     extern Word_t *checked_memalign(int n,int align);
28 :     #define checked_alloc(n) checked_memalign((n),(1))
29 :    
30 :     extern Word_t mk_C_function(ml_state_t *msp,
31 :     ml_val_t f,
32 :     int nargs,char *argtypes[],char *rettype);
33 :    
34 :     extern ml_val_t datumCtoML(ml_state_t *msp,char *type,Word_t p,ml_val_t *root);
35 :     extern int datumMLtoC(ml_state_t *msp,char **t,Word_t **p,ml_val_t ret);
36 :     extern ml_val_t revMLList(ml_val_t l,ml_val_t acc);
37 :    
38 :     extern ml_state_t *visible_msp;
39 :     #endif
40 :    
41 :     #endif /* !_C_CALLS_ */
42 :    

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