Changeset 1b1cd2c for perlglue.xs


Ignore:
Timestamp:
Mar 23, 2010, 5:23:43 PM (12 years ago)
Author:
Nelson Elhage <nelhage@ksplice.com>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
8dfb59c
Parents:
6b78afb
git-author:
Nelson Elhage <nelhage@mit.edu> (03/13/10 21:18:03)
git-committer:
Nelson Elhage <nelhage@ksplice.com> (03/23/10 17:23:43)
Message:
Editwin: Add a callback to destroy cbdata
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    r8c59178 r1b1cd2c  
    179179                owl_function_start_question(line);
    180180
    181                 owl_editwin_set_cbdata(owl_global_get_typwin(&g), newSVsv(callback));
     181                owl_editwin_set_cbdata(owl_global_get_typwin(&g),
     182                                       newSVsv(callback),
     183                                       owl_perlconfig_dec_refcnt);
    182184                owl_editwin_set_callback(owl_global_get_typwin(&g), owl_perlconfig_edit_callback);
    183185        }
     
    195197                owl_function_start_password(line);
    196198
    197                 owl_editwin_set_cbdata(owl_global_get_typwin(&g), newSVsv(callback));
     199                owl_editwin_set_cbdata(owl_global_get_typwin(&g),
     200                                       newSVsv(callback),
     201                                       owl_perlconfig_dec_refcnt);
    198202                owl_editwin_set_callback(owl_global_get_typwin(&g), owl_perlconfig_edit_callback);
    199203        }
     
    208212                        croak("Callback must be a subref");
    209213
    210                 owl_function_start_edit_win(line, owl_perlconfig_edit_callback, newSVsv(callback));
     214                owl_function_start_edit_win(line,
     215                                            owl_perlconfig_edit_callback,
     216                                            newSVsv(callback),
     217                                            owl_perlconfig_dec_refcnt);
    211218        }
    212219
Note: See TracChangeset for help on using the changeset viewer.