Changeset 9186c75 for perlglue.xs


Ignore:
Timestamp:
Mar 29, 2010, 11:11:32 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0fe69d2
Parents:
98d296d
git-author:
Nelson Elhage <nelhage@ksplice.com> (03/19/10 17:21:32)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/29/10 23:11:32)
Message:
Make functions that start an editwin return it, too.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    r38cc669 r9186c75  
    172172        SV *callback
    173173        PREINIT:
     174                owl_editwin *e;
    174175        CODE:
    175176        {
     
    177178                        croak("Callback must be a subref");
    178179
    179                 owl_function_start_question(line);
    180 
    181                 owl_editwin_set_cbdata(owl_global_get_typwin(&g),
     180                e = owl_function_start_question(line);
     181
     182                owl_editwin_set_cbdata(e,
    182183                                       newSVsv(callback),
    183184                                       owl_perlconfig_dec_refcnt);
    184                 owl_editwin_set_callback(owl_global_get_typwin(&g), owl_perlconfig_edit_callback);
     185                owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
    185186        }
    186187
     
    190191        SV *callback
    191192        PREINIT:
     193                owl_editwin *e;
    192194        CODE:
    193195        {
     
    195197                        croak("Callback must be a subref");
    196198
    197                 owl_function_start_password(line);
    198 
    199                 owl_editwin_set_cbdata(owl_global_get_typwin(&g),
     199                e = owl_function_start_password(line);
     200
     201                owl_editwin_set_cbdata(e,
    200202                                       newSVsv(callback),
    201203                                       owl_perlconfig_dec_refcnt);
    202                 owl_editwin_set_callback(owl_global_get_typwin(&g), owl_perlconfig_edit_callback);
     204                owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
    203205        }
    204206
Note: See TracChangeset for help on using the changeset viewer.