1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
2011-07-27 07:17:02 -07:00
|
|
|
/* OCaml */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy and Damien Doligez, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1999-11-17 10:59:06 -08:00
|
|
|
/* en Automatique. All rights reserved. This file is distributed */
|
2001-12-07 05:41:02 -08:00
|
|
|
/* under the terms of the GNU Library General Public License, with */
|
|
|
|
/* the special exception on linking described in file ../LICENSE. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
2003-12-15 08:28:22 -08:00
|
|
|
#ifndef CAML_ALLOC_H
|
|
|
|
#define CAML_ALLOC_H
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
|
2003-12-29 14:15:02 -08:00
|
|
|
#ifndef CAML_NAME_SPACE
|
2003-12-15 08:28:22 -08:00
|
|
|
#include "compatibility.h"
|
2003-12-29 14:15:02 -08:00
|
|
|
#endif
|
1995-05-04 03:15:53 -07:00
|
|
|
#include "misc.h"
|
|
|
|
#include "mlvalues.h"
|
|
|
|
|
2012-01-07 12:55:28 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2003-12-29 14:15:02 -08:00
|
|
|
CAMLextern value caml_alloc (mlsize_t, tag_t);
|
|
|
|
CAMLextern value caml_alloc_small (mlsize_t, tag_t);
|
|
|
|
CAMLextern value caml_alloc_tuple (mlsize_t);
|
|
|
|
CAMLextern value caml_alloc_string (mlsize_t); /* size in bytes */
|
|
|
|
CAMLextern value caml_copy_string (char const *);
|
|
|
|
CAMLextern value caml_copy_string_array (char const **);
|
2004-01-02 11:23:29 -08:00
|
|
|
CAMLextern value caml_copy_double (double);
|
2004-01-01 08:42:43 -08:00
|
|
|
CAMLextern value caml_copy_int32 (int32); /* defined in [ints.c] */
|
|
|
|
CAMLextern value caml_copy_int64 (int64); /* defined in [ints.c] */
|
2005-09-22 07:21:50 -07:00
|
|
|
CAMLextern value caml_copy_nativeint (intnat); /* defined in [ints.c] */
|
2003-12-29 14:15:02 -08:00
|
|
|
CAMLextern value caml_alloc_array (value (*funct) (char const *),
|
|
|
|
char const ** array);
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-02-10 06:04:59 -08:00
|
|
|
typedef void (*final_fun)(value);
|
2003-12-29 14:15:02 -08:00
|
|
|
CAMLextern value caml_alloc_final (mlsize_t, /*size in words*/
|
|
|
|
final_fun, /*finalization function*/
|
|
|
|
mlsize_t, /*resources consumed*/
|
|
|
|
mlsize_t /*max resources*/);
|
2000-02-10 06:04:59 -08:00
|
|
|
|
2003-12-29 14:15:02 -08:00
|
|
|
CAMLextern int caml_convert_flag_list (value, int *);
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-01-07 12:55:28 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2003-12-15 08:28:22 -08:00
|
|
|
#endif /* CAML_ALLOC_H */
|