示例#1
0
CAMLprim value ml_gsl_monte_plain_free(value s)
{
    remove_global_root(&(CallbackParams_val(s)->closure));
    remove_global_root(&(CallbackParams_val(s)->dbl));
    stat_free(CallbackParams_val(s));
    gsl_monte_plain_free(GSLPLAINSTATE_VAL(s));
    return Val_unit;
}
示例#2
0
CAMLprim value ml_gsl_monte_vegas_free(value state)
{
    gsl_monte_vegas_state *s=GSLVEGASSTATE_VAL(state);
    remove_global_root(&(CallbackParams_val(state)->closure));
    remove_global_root(&(CallbackParams_val(state)->dbl));
    stat_free(CallbackParams_val(state));
    if(s->ostream != stdout && s->ostream != stderr)
        fclose(s->ostream);
    remove_global_root(&GSLVEGASSTREAM_VAL(state));
    gsl_monte_vegas_free(s);
    return Val_unit;
}
示例#3
0
CAMLprim value ml_gsl_odeiv_free_system(value vsyst)
{
  gsl_odeiv_system *syst = ODEIV_SYSTEM_VAL(vsyst);
  struct mlgsl_odeiv_params *p = syst->params;
  remove_global_root(&(p->closure));
  remove_global_root(&(p->jac_closure));
  remove_global_root(&(p->arr1));
  remove_global_root(&(p->arr2));
  remove_global_root(&(p->mat));
  stat_free(p);
  stat_free(syst);
  return Val_unit;
}
示例#4
0
CAMLprim value ml_gsl_min_fminimizer_free(value s)
{
  remove_global_root(&(Mparams_val(s)->closure));
  stat_free(Mparams_val(s));
  gsl_min_fminimizer_free(Minimizer_val(s));
  return Val_unit;
}
示例#5
0
CAMLprim value ml_gsl_multiroot_fdfsolver_free(value S)
{
  struct callback_params *p=CALLBACKPARAMS_VAL(S);
  remove_global_root(&(p->closure));
  stat_free(p);
  gsl_multiroot_fdfsolver_free(GSLMULTIROOTFDFSOLVER_VAL(S));
  return Val_unit;
}
示例#6
0
CAMLprim value ml_gsl_multimin_fdfminimizer_free(value S)
{
  struct callback_params *p=CALLBACKPARAMS_VAL(S);
  remove_global_root(&(p->closure));
  stat_free(p);
  gsl_multimin_fdfminimizer_free(GSLMULTIMINFDFMINIMIZER_VAL(S));
  return Val_unit;
}
示例#7
0
CAMLprim value ml_gsl_root_fdfsolver_free(value s)
{
    struct callback_params *p=Fparams_val(s);
    remove_global_root(&(p->closure));
    stat_free(p);
    gsl_root_fdfsolver_free(FDFsolver_val(s));
    return Val_unit;
}
示例#8
0
static int
run_cleanup (void *fv)
{
    value f = *(value *) fv;

    callback (f, Val_unit);
    remove_global_root ((value *) fv);
    return OK;
}
示例#9
0
value caml_Tcl_DeleteFileHandler(value descriptor) {
    filehandler *h;
    CAMLparam1(descriptor);
    
    h = (filehandler *) descriptor;
    Tcl_DeleteFileHandler(h->fd);

    remove_global_root(&(h->callback_fn));

    free(h);

    CAMLreturn(Val_int(0));
}
示例#10
0
value caml_Tcl_DeleteTimerHandler(value descriptor) {
    timerhandler *h;
    CAMLparam1(descriptor);
    
    h = (timerhandler *) descriptor;
    Tcl_DeleteTimerHandler(h->token);

    remove_global_root(&(h->callback_fn));

    free(h);

    CAMLreturn(Val_int(0));
}
示例#11
0
value gb_remove(value vblock)
{
  remove_global_root(&(Block_val(vblock)->v));
  return Val_unit;
}
示例#12
0
文件: wrappers.c 项目: an146/lablgtk
CAMLexport void ml_global_root_destroy (void *data)
{
    remove_global_root ((value *)data);
    stat_free (data);
}