Changeset d41294a for perlglue.xs


Ignore:
Timestamp:
Jul 11, 2009, 1:14:36 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
c6ecf5c
Parents:
cf26b72
git-author:
Nelson Elhage <nelhage@mit.edu> (06/21/09 01:08:14)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:36)
Message:
Export some more functions to perl.

get_region, combined with save_excursion, is a very convenient way for
perl to access a specified piece of the buffer.

In addition, provide methods to get information about the current
point and mark.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    ra88f35a rd41294a  
    483483                RETVAL
    484484
     485char *
     486get_region()
     487        PREINIT:
     488                char *region;
     489        CODE:
     490                region = owl_editwin_get_region(owl_global_get_typwin(&g));
     491                RETVAL = region;
     492        OUTPUT:
     493                RETVAL
     494        CLEANUP:
     495                owl_free(region);
     496
    485497SV *
    486498save_excursion(sub)
     
    509521        OUTPUT:
    510522                RETVAL
     523
     524int
     525current_column()
     526        CODE:
     527                RETVAL = owl_editwin_current_column(owl_global_get_typwin(&g));
     528        OUTPUT:
     529                RETVAL
     530
     531int
     532point()
     533        CODE:
     534                RETVAL = owl_editwin_get_point(owl_global_get_typwin(&g));
     535        OUTPUT:
     536                RETVAL
     537
     538int
     539mark()
     540        CODE:
     541                RETVAL = owl_editwin_get_mark(owl_global_get_typwin(&g));
     542        OUTPUT:
     543                RETVAL
Note: See TracChangeset for help on using the changeset viewer.