Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove effects from GC handlers
  • Loading branch information
rain-1 committed Apr 30, 2016
1 parent de553c4 commit e6cbeb6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 57 deletions.
22 changes: 0 additions & 22 deletions ncurses/form_type.c
Expand Up @@ -181,11 +181,6 @@ gc_free_field (SCM field)

if (f != NULL)
{
int ret = free_field (f);
if (ret != E_OK)
{
/* ??? --- what should happen when free fails? */
}
SCM_SET_SMOB_DATA (field, NULL);
}

Expand Down Expand Up @@ -318,23 +313,6 @@ gc_free_form (SCM x)

if (form != NULL && form->form != NULL)
{
retval = free_form (form->form);
form->form = (FORM *) NULL;
if (retval == E_BAD_ARGUMENT)
{
scm_error_scm (SCM_BOOL_F,
scm_from_locale_string ("garbage collection of form"),
scm_from_locale_string ("bad argument"),
SCM_BOOL_F, SCM_BOOL_F);
}
else if (retval == E_POSTED)
{
scm_error_scm (SCM_BOOL_F,
scm_from_locale_string ("garbage collection of form"),
scm_from_locale_string ("posted"),
SCM_BOOL_F, SCM_BOOL_F);
}

/* Release scheme objects from the guardians */
/* Detach the fields */
if (form->fields)
Expand Down
26 changes: 0 additions & 26 deletions ncurses/menu_type.c
Expand Up @@ -157,8 +157,6 @@ gc_free_item (SCM item)

assert (m != NULL);

free_item (m);

return 0;
}

Expand Down Expand Up @@ -270,30 +268,6 @@ gc_free_menu (SCM x)

assert (gm != NULL);

retval = free_menu (gm->menu);

if (retval == E_BAD_ARGUMENT)
{
scm_error_scm (SCM_BOOL_F,
scm_from_locale_string ("garbage collection of menu"),
scm_from_locale_string ("bad argument"),
SCM_BOOL_F, SCM_BOOL_F);
}
else if (retval == E_POSTED)
{
scm_error_scm (SCM_BOOL_F,
scm_from_locale_string ("garbage collection of menu"),
scm_from_locale_string ("posted"),
SCM_BOOL_F, SCM_BOOL_F);
}
else if (retval == E_SYSTEM_ERROR)
{
scm_error_scm (SCM_BOOL_F,
scm_from_locale_string ("garbage collection of menu"),
scm_from_locale_string ("system error"),
SCM_BOOL_F, SCM_BOOL_F);
}

/* Release scheme objects from the guardians */
while (scm_is_true (scm_call_0 (gm->items_guard)))
;
Expand Down
9 changes: 0 additions & 9 deletions ncurses/type.c
Expand Up @@ -911,18 +911,14 @@ _scm_free_screen (SCM x)

if (sp->screen)
{
delscreen (sp->screen);
/* delscreen returns void */
sp->screen = NULL;
}
if (sp->ifp)
{
fclose (sp->ifp);
sp->ifp = NULL;
}
if (sp->ofp)
{
fclose (sp->ofp);
sp->ofp = NULL;
}
}
Expand Down Expand Up @@ -1075,15 +1071,10 @@ free_window (SCM x)
{
if (win == stdscr)
{
endwin ();
fprintf (stderr, "Freeing stdscr #<window %p>", (void *) stdscr);
delwin (stdscr);
SCM_SET_SMOB_DATA (x, 0);
}
else
{
/* This is going to break something */
delwin (win);
SCM_SET_SMOB_DATA (x, 0);
}
}
Expand Down

0 comments on commit e6cbeb6

Please sign in to comment.