Meilleure solution au probleme des CAMLprim dans camltk.h
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5680 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
c06215411e
commit
3577d2c1fa
|
@ -25,7 +25,8 @@ extern value tcl_string_to_caml( char * );
|
|||
extern char * caml_string_to_tcl( value );
|
||||
|
||||
/* cltkEval.c */
|
||||
CAMLprim Tcl_Interp *cltclinterp; /* The Tcl interpretor */
|
||||
extern Tcl_Interp *cltclinterp; /* The Tcl interpretor */
|
||||
extern Tcl_Interp * get_cltclinterp(void);
|
||||
extern value copy_string_list(int argc, char ** argv);
|
||||
|
||||
/* cltkCaml.c */
|
||||
|
@ -34,7 +35,7 @@ extern value *tkerror_exn;
|
|||
extern value *handler_code;
|
||||
extern int CamlCBCmd(ClientData clientdata, Tcl_Interp *interp,
|
||||
int argc, char *argv[]);
|
||||
CAMLprim void tk_error(char * errmsg) Noreturn;
|
||||
extern void tk_error(char * errmsg) Noreturn;
|
||||
|
||||
/* cltkMain.c */
|
||||
extern int signal_events;
|
||||
|
|
|
@ -30,7 +30,12 @@
|
|||
#include "camltk.h"
|
||||
|
||||
/* The Tcl interpretor */
|
||||
CAMLprim Tcl_Interp *cltclinterp = NULL;
|
||||
Tcl_Interp *cltclinterp = NULL;
|
||||
|
||||
CAMLexport Tcl_Interp * get_cltclinterp(void)
|
||||
{
|
||||
return cltclinterp;
|
||||
}
|
||||
|
||||
/* Copy a list of strings from the C heap to Caml */
|
||||
value copy_string_list(int argc, char **argv)
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
extern int Tkanim_Init(Tcl_Interp *);
|
||||
|
||||
value tkanim_init (rien) /* ML */
|
||||
CAMLprim value tkanim_init (rien) /* ML */
|
||||
value rien;
|
||||
{
|
||||
if (Tkanim_Init(cltclinterp) != TCL_OK)
|
||||
if (Tkanim_Init(get_cltclinterp()) != TCL_OK)
|
||||
tk_error ("Can't initialize TkAnim");
|
||||
return Val_unit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue