Commit ba7551b9 authored by Mathieu L Bouchard's avatar Mathieu L Bouchard
Browse files

remove useless glist_free and glist_cleanup functions

parent 1544b865
...@@ -870,7 +870,6 @@ extern void canvas_group_free(t_pd *x); ...@@ -870,7 +870,6 @@ extern void canvas_group_free(t_pd *x);
void canvas_free(t_canvas *x) void canvas_free(t_canvas *x)
{ {
//fprintf(stderr,"canvas_free %lx\n", x);
t_gobj *y; t_gobj *y;
int dspstate = canvas_suspend_dsp(); int dspstate = canvas_suspend_dsp();
...@@ -890,12 +889,8 @@ void canvas_free(t_canvas *x) ...@@ -890,12 +889,8 @@ void canvas_free(t_canvas *x)
if (x->gl_editor) if (x->gl_editor)
canvas_destroy_editor(x); /* bug workaround; should already be gone*/ canvas_destroy_editor(x); /* bug workaround; should already be gone*/
/* if (x-> x_handle) scalehandle_free( x->x_handle);
if (x-> x_handle) if (x->x_mhandle) scalehandle_free(x->x_mhandle);
scalehandle_free(x->x_handle);
if (x-> x_mhandle)
scalehandle_free(x->x_mhandle);
*/
canvas_unbind(x); canvas_unbind(x);
if (x->gl_env) if (x->gl_env)
...@@ -904,7 +899,9 @@ void canvas_free(t_canvas *x) ...@@ -904,7 +899,9 @@ void canvas_free(t_canvas *x)
freebytes(x->gl_env, sizeof(*x->gl_env)); freebytes(x->gl_env, sizeof(*x->gl_env));
} }
canvas_resume_dsp(dspstate); canvas_resume_dsp(dspstate);
glist_cleanup(x); freebytes(x->gl_xlabel, x->gl_nxlabels * sizeof(*(x->gl_xlabel)));
freebytes(x->gl_ylabel, x->gl_nylabels * sizeof(*(x->gl_ylabel)));
gstub_cutoff(x->gl_stub);
gfxstub_deleteforkey(x); /* probably unnecessary */ gfxstub_deleteforkey(x); /* probably unnecessary */
if (!x->gl_owner) if (!x->gl_owner)
canvas_takeofflist(x); canvas_takeofflist(x);
......
...@@ -428,9 +428,6 @@ EXTERN int gobj_shouldvis(t_gobj *x, struct _glist *glist); ...@@ -428,9 +428,6 @@ EXTERN int gobj_shouldvis(t_gobj *x, struct _glist *glist);
EXTERN t_glist *glist_new( void); EXTERN t_glist *glist_new( void);
EXTERN void glist_init(t_glist *x); EXTERN void glist_init(t_glist *x);
EXTERN void glist_add(t_glist *x, t_gobj *g); EXTERN void glist_add(t_glist *x, t_gobj *g);
EXTERN void glist_cleanup(t_glist *x);
EXTERN void glist_free(t_glist *x);
EXTERN void glist_clear(t_glist *x); EXTERN void glist_clear(t_glist *x);
EXTERN t_canvas *glist_getcanvas(t_glist *x); EXTERN t_canvas *glist_getcanvas(t_glist *x);
EXTERN int glist_isselected(t_glist *x, t_gobj *y); EXTERN int glist_isselected(t_glist *x, t_gobj *y);
......
...@@ -410,31 +410,6 @@ void glist_sort(t_glist *x) ...@@ -410,31 +410,6 @@ void glist_sort(t_glist *x)
x->gl_list = glist_dosort(x, x->gl_list, nitems); x->gl_list = glist_dosort(x, x->gl_list, nitems);
} }
void glist_cleanup(t_glist *x)
{
//fprintf(stderr,"glist_cleanup =============\n");
freebytes(x->gl_xlabel, x->gl_nxlabels * sizeof(*(x->gl_xlabel)));
freebytes(x->gl_ylabel, x->gl_nylabels * sizeof(*(x->gl_ylabel)));
if (x->x_handle)
{
pd_unbind((t_pd *)x->x_handle, ((t_scalehandle *)x->x_handle)->h_bindsym);
pd_free((t_pd *)x->x_handle);
}
if (x->x_mhandle)
{
pd_unbind((t_pd *)x->x_mhandle, ((t_scalehandle *)x->x_mhandle)->h_bindsym);
pd_free((t_pd *)x->x_mhandle);
}
gstub_cutoff(x->gl_stub);
}
void glist_free(t_glist *x)
{
//fprintf(stderr,"glist_free =============\n");
glist_cleanup(x);
freebytes(x, sizeof(*x));
}
/* --------------- inlets and outlets ----------- */ /* --------------- inlets and outlets ----------- */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment