ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV.xs
(Generate patch)

Comparing EV/EV.xs (file contents):
Revision 1.103 by root, Wed Dec 26 14:55:22 2007 UTC vs.
Revision 1.115 by root, Mon Sep 8 17:27:42 2008 UTC

1#include "EXTERN.h" 1#include "EXTERN.h"
2#include "perl.h" 2#include "perl.h"
3#include "XSUB.h" 3#include "XSUB.h"
4 4
5/*#include <netinet/in.h>*/ 5/*#include <netinet/in.h>*/
6
7/* fix perl api breakage */
8#undef signal
9#undef sigaction
6 10
7#define EV_PROTOTYPES 1 11#define EV_PROTOTYPES 1
8#define EV_USE_NANOSLEEP EV_USE_MONOTONIC 12#define EV_USE_NANOSLEEP EV_USE_MONOTONIC
9#define EV_H <ev.h> 13#define EV_H <ev.h>
10#include "EV/EVAPI.h" 14#include "EV/EVAPI.h"
11
12/* fix perl api breakage */
13#undef signal
14#undef sigaction
15 15
16#define EV_SELECT_IS_WINSOCKET 0 16#define EV_SELECT_IS_WINSOCKET 0
17#ifdef _WIN32 17#ifdef _WIN32
18# define EV_SELECT_USE_FD_SET 0 18# define EV_SELECT_USE_FD_SET 0
19# define NFDBITS PERL_NFDBITS 19# define NFDBITS PERL_NFDBITS
29#define e_loop(w) INT2PTR (struct ev_loop *, SvIVX ((w)->loop)) 29#define e_loop(w) INT2PTR (struct ev_loop *, SvIVX ((w)->loop))
30 30
31#define WFLAG_KEEPALIVE 1 31#define WFLAG_KEEPALIVE 1
32 32
33#define UNREF(w) \ 33#define UNREF(w) \
34 if (!((w)->flags & WFLAG_KEEPALIVE) \ 34 if (!((w)->e_flags & WFLAG_KEEPALIVE) \
35 && !ev_is_active (w)) \ 35 && !ev_is_active (w)) \
36 ev_unref (e_loop (w)); 36 ev_unref (e_loop (w));
37 37
38#define REF(w) \ 38#define REF(w) \
39 if (!((w)->flags & WFLAG_KEEPALIVE) \ 39 if (!((w)->e_flags & WFLAG_KEEPALIVE) \
40 && ev_is_active (w)) \ 40 && ev_is_active (w)) \
41 ev_ref (e_loop (w)); 41 ev_ref (e_loop (w));
42 42
43#define START(type,w) \ 43#define START(type,w) \
44 do { \ 44 do { \
77 *stash_stat, 77 *stash_stat,
78 *stash_idle, 78 *stash_idle,
79 *stash_prepare, 79 *stash_prepare,
80 *stash_check, 80 *stash_check,
81 *stash_embed, 81 *stash_embed,
82 *stash_fork; 82 *stash_fork,
83 *stash_async;
83 84
84#ifndef SIG_SIZE 85#ifndef SIG_SIZE
85/* kudos to Slaven Rezic for the idea */ 86/* kudos to Slaven Rezic for the idea */
86static char sig_size [] = { SIG_NUM }; 87static char sig_size [] = { SIG_NUM };
87# define SIG_SIZE (sizeof (sig_size) + 1) 88# define SIG_SIZE (sizeof (sig_size) + 1)
126 return SvIV (fh); 127 return SvIV (fh);
127 128
128 return -1; 129 return -1;
129} 130}
130 131
132static SV *
133e_get_cv (SV *cb_sv)
134{
135 HV *st;
136 GV *gvp;
137 CV *cv = sv_2cv (cb_sv, &st, &gvp, 0);
138
139 if (!cv)
140 croak ("EV watcher callback must be a CODE reference");
141
142 return (SV *)cv;
143}
144
131static void * 145static void *
132e_new (int size, SV *cb_sv, SV *loop) 146e_new (int size, SV *cb_sv, SV *loop)
133{ 147{
148 SV *cv = cb_sv ? e_get_cv (cb_sv) : 0;
134 ev_watcher *w; 149 ev_watcher *w;
135 SV *self = NEWSV (0, size); 150 SV *self = NEWSV (0, size);
136 SvPOK_only (self); 151 SvPOK_only (self);
137 SvCUR_set (self, size); 152 SvCUR_set (self, size);
138 153
139 w = (ev_watcher *)SvPVX (self); 154 w = (ev_watcher *)SvPVX (self);
140 155
141 ev_init (w, e_cb); 156 ev_init (w, cv ? e_cb : 0);
142 157
143 w->loop = SvREFCNT_inc (SvRV (loop)); 158 w->loop = SvREFCNT_inc (SvRV (loop));
144 w->flags = WFLAG_KEEPALIVE; 159 w->e_flags = WFLAG_KEEPALIVE;
145 w->data = 0; 160 w->data = 0;
146 w->fh = 0; 161 w->fh = 0;
147 w->cb_sv = SvTEMP (cb_sv) && SvREFCNT (cb_sv) == 1 ? SvREFCNT_inc (cb_sv) : newSVsv (cb_sv); 162 w->cb_sv = SvREFCNT_inc (cv);
148 w->self = self; 163 w->self = self;
149 164
150 return (void *)w; 165 return (void *)w;
151} 166}
152 167
153static void 168static void
375 stash_check = gv_stashpv ("EV::Check" , 1); 390 stash_check = gv_stashpv ("EV::Check" , 1);
376 stash_child = gv_stashpv ("EV::Child" , 1); 391 stash_child = gv_stashpv ("EV::Child" , 1);
377 stash_embed = gv_stashpv ("EV::Embed" , 1); 392 stash_embed = gv_stashpv ("EV::Embed" , 1);
378 stash_stat = gv_stashpv ("EV::Stat" , 1); 393 stash_stat = gv_stashpv ("EV::Stat" , 1);
379 stash_fork = gv_stashpv ("EV::Fork" , 1); 394 stash_fork = gv_stashpv ("EV::Fork" , 1);
395 stash_async = gv_stashpv ("EV::Async" , 1);
380 396
381 { 397 {
382 SV *sv = perl_get_sv ("EV::API", TRUE); 398 SV *sv = perl_get_sv ("EV::API", TRUE);
383 perl_get_sv ("EV::API", TRUE); /* silence 5.10 warning */ 399 perl_get_sv ("EV::API", TRUE); /* silence 5.10 warning */
384 400
388 evapi.sv_fileno = sv_fileno; 404 evapi.sv_fileno = sv_fileno;
389 evapi.sv_signum = sv_signum; 405 evapi.sv_signum = sv_signum;
390 evapi.supported_backends = ev_supported_backends (); 406 evapi.supported_backends = ev_supported_backends ();
391 evapi.recommended_backends = ev_recommended_backends (); 407 evapi.recommended_backends = ev_recommended_backends ();
392 evapi.embeddable_backends = ev_embeddable_backends (); 408 evapi.embeddable_backends = ev_embeddable_backends ();
393 evapi.time = ev_time; 409 evapi.time_ = ev_time;
394 evapi.sleep = ev_sleep; 410 evapi.sleep_ = ev_sleep;
395 evapi.loop_new = ev_loop_new; 411 evapi.loop_new = ev_loop_new;
396 evapi.loop_destroy = ev_loop_destroy; 412 evapi.loop_destroy = ev_loop_destroy;
397 evapi.loop_fork = ev_loop_fork; 413 evapi.loop_fork = ev_loop_fork;
398 evapi.loop_count = ev_loop_count; 414 evapi.loop_count = ev_loop_count;
399 evapi.now = ev_now; 415 evapi.now = ev_now;
416 evapi.now_update = ev_now_update;
400 evapi.backend = ev_backend; 417 evapi.backend = ev_backend;
401 evapi.unloop = ev_unloop; 418 evapi.unloop = ev_unloop;
402 evapi.ref = ev_ref; 419 evapi.ref = ev_ref;
403 evapi.unref = ev_unref; 420 evapi.unref = ev_unref;
404 evapi.loop = ev_loop; 421 evapi.loop = ev_loop;
426 evapi.embed_start = ev_embed_start; 443 evapi.embed_start = ev_embed_start;
427 evapi.embed_stop = ev_embed_stop; 444 evapi.embed_stop = ev_embed_stop;
428 evapi.embed_sweep = ev_embed_sweep; 445 evapi.embed_sweep = ev_embed_sweep;
429 evapi.fork_start = ev_fork_start; 446 evapi.fork_start = ev_fork_start;
430 evapi.fork_stop = ev_fork_stop; 447 evapi.fork_stop = ev_fork_stop;
448 evapi.async_start = ev_async_start;
449 evapi.async_stop = ev_async_stop;
450 evapi.async_send = ev_async_send;
431 evapi.clear_pending = ev_clear_pending; 451 evapi.clear_pending = ev_clear_pending;
432 evapi.invoke = ev_invoke; 452 evapi.invoke = ev_invoke;
433 453
434 sv_setiv (sv, (IV)&evapi); 454 sv_setiv (sv, (IV)&evapi);
435 SvREADONLY_on (sv); 455 SvREADONLY_on (sv);
472NV ev_time () 492NV ev_time ()
473 493
474NV ev_now () 494NV ev_now ()
475 C_ARGS: evapi.default_loop 495 C_ARGS: evapi.default_loop
476 496
497void ev_now_update ()
498 C_ARGS: evapi.default_loop
499
477unsigned int ev_backend () 500unsigned int ev_backend ()
478 C_ARGS: evapi.default_loop 501 C_ARGS: evapi.default_loop
479 502
480unsigned int ev_loop_count () 503unsigned int ev_loop_count ()
481 C_ARGS: evapi.default_loop 504 C_ARGS: evapi.default_loop
487 C_ARGS: evapi.default_loop, interval 510 C_ARGS: evapi.default_loop, interval
488 511
489void ev_loop (int flags = 0) 512void ev_loop (int flags = 0)
490 C_ARGS: evapi.default_loop, flags 513 C_ARGS: evapi.default_loop, flags
491 514
492void ev_unloop (int how = 1) 515void ev_unloop (int how = EVUNLOOP_ONE)
493 C_ARGS: evapi.default_loop, how 516 C_ARGS: evapi.default_loop, how
494 517
495void ev_feed_fd_event (int fd, int revents = EV_NONE) 518void ev_feed_fd_event (int fd, int revents = EV_NONE)
496 C_ARGS: evapi.default_loop, fd, revents 519 C_ARGS: evapi.default_loop, fd, revents
497 520
602 ev_fork_set (RETVAL); 625 ev_fork_set (RETVAL);
603 if (!ix) START (fork, RETVAL); 626 if (!ix) START (fork, RETVAL);
604 OUTPUT: 627 OUTPUT:
605 RETVAL 628 RETVAL
606 629
607ev_child *child (int pid, SV *cb) 630ev_child *child (int pid, int trace, SV *cb)
608 ALIAS: 631 ALIAS:
609 child_ns = 1 632 child_ns = 1
610 CODE: 633 CODE:
611 RETVAL = e_new (sizeof (ev_child), cb, default_loop_sv); 634 RETVAL = e_new (sizeof (ev_child), cb, default_loop_sv);
612 ev_child_set (RETVAL, pid); 635 ev_child_set (RETVAL, pid, trace);
613 if (!ix) START (child, RETVAL); 636 if (!ix) START (child, RETVAL);
614 OUTPUT: 637 OUTPUT:
615 RETVAL 638 RETVAL
616 639
617ev_stat *stat (SV *path, NV interval, SV *cb) 640ev_stat *stat (SV *path, NV interval, SV *cb)
623 ev_stat_set (RETVAL, SvPVbyte_nolen (RETVAL->fh), interval); 646 ev_stat_set (RETVAL, SvPVbyte_nolen (RETVAL->fh), interval);
624 if (!ix) START (stat, RETVAL); 647 if (!ix) START (stat, RETVAL);
625 OUTPUT: 648 OUTPUT:
626 RETVAL 649 RETVAL
627 650
628ev_embed *embed (struct ev_loop *loop, SV *cb = &PL_sv_undef) 651ev_embed *embed (struct ev_loop *loop, SV *cb = 0)
629 ALIAS: 652 ALIAS:
630 embed_ns = 1 653 embed_ns = 1
631 CODE: 654 CODE:
632{ 655{
633 if (!(ev_backend (loop) & ev_embeddable_backends ())) 656 if (!(ev_backend (loop) & ev_embeddable_backends ()))
634 croak ("passed loop is not embeddable via EV::embed,"); 657 croak ("passed loop is not embeddable via EV::embed,");
635 658
636 RETVAL = e_new (sizeof (ev_embed), cb, default_loop_sv); 659 RETVAL = e_new (sizeof (ev_embed), cb, default_loop_sv);
637 RETVAL->fh = newSVsv (ST (0)); 660 RETVAL->fh = newSVsv (ST (0));
638 ev_embed_set (RETVAL, loop); 661 ev_embed_set (RETVAL, loop);
639
640 if (!SvOK (cb)) ev_set_cb (RETVAL, 0);
641
642 if (!ix) START (embed, RETVAL); 662 if (!ix) START (embed, RETVAL);
643} 663}
664 OUTPUT:
665 RETVAL
666
667ev_async *async (SV *cb)
668 ALIAS:
669 async_ns = 1
670 CODE:
671 RETVAL = e_new (sizeof (ev_async), cb, default_loop_sv);
672 ev_async_set (RETVAL);
673 if (!ix) START (async, RETVAL);
644 OUTPUT: 674 OUTPUT:
645 RETVAL 675 RETVAL
646 676
647void once (SV *fh, int events, SV *timeout, SV *cb) 677void once (SV *fh, int events, SV *timeout, SV *cb)
648 CODE: 678 CODE:
672 C_ARGS: e_loop (w), w, revents 702 C_ARGS: e_loop (w), w, revents
673 703
674int keepalive (ev_watcher *w, int new_value = 0) 704int keepalive (ev_watcher *w, int new_value = 0)
675 CODE: 705 CODE:
676{ 706{
677 RETVAL = w->flags & WFLAG_KEEPALIVE; 707 RETVAL = w->e_flags & WFLAG_KEEPALIVE;
678 new_value = new_value ? WFLAG_KEEPALIVE : 0; 708 new_value = new_value ? WFLAG_KEEPALIVE : 0;
679 709
680 if (items > 1 && ((new_value ^ w->flags) & WFLAG_KEEPALIVE)) 710 if (items > 1 && ((new_value ^ w->e_flags) & WFLAG_KEEPALIVE))
681 { 711 {
682 REF (w); 712 REF (w);
683 w->flags = (w->flags & ~WFLAG_KEEPALIVE) | new_value; 713 w->e_flags = (w->e_flags & ~WFLAG_KEEPALIVE) | new_value;
684 UNREF (w); 714 UNREF (w);
685 } 715 }
686} 716}
687 OUTPUT: 717 OUTPUT:
688 RETVAL 718 RETVAL
689 719
690SV *cb (ev_watcher *w, SV *new_cb = 0) 720SV *cb (ev_watcher *w, SV *new_cb = 0)
691 CODE: 721 CODE:
692{ 722{
693 RETVAL = newSVsv (w->cb_sv);
694
695 if (items > 1) 723 if (items > 1)
696 sv_setsv (w->cb_sv, new_cb); 724 {
725 new_cb = e_get_cv (new_cb);
726 RETVAL = newRV_noinc (w->cb_sv);
727 w->cb_sv = SvREFCNT_inc (new_cb);
728 }
729 else
730 RETVAL = newRV_inc (w->cb_sv);
697} 731}
698 OUTPUT: 732 OUTPUT:
699 RETVAL 733 RETVAL
700 734
701SV *data (ev_watcher *w, SV *new_data = 0) 735SV *data (ev_watcher *w, SV *new_data = 0)
874 INIT: 908 INIT:
875 CHECK_REPEAT (repeat); 909 CHECK_REPEAT (repeat);
876 CODE: 910 CODE:
877 RESET (timer, w, (w, after, repeat)); 911 RESET (timer, w, (w, after, repeat));
878 912
879NV at (ev_timer *w)
880 CODE:
881 RETVAL = w->at;
882 OUTPUT:
883 RETVAL
884
885MODULE = EV PACKAGE = EV::Periodic PREFIX = ev_periodic_ 913MODULE = EV PACKAGE = EV::Periodic PREFIX = ev_periodic_
886 914
887void ev_periodic_start (ev_periodic *w) 915void ev_periodic_start (ev_periodic *w)
888 INIT: 916 INIT:
889 CHECK_REPEAT (w->interval); 917 CHECK_REPEAT (w->interval);
916 RESET (periodic, w, (w, at, interval, w->fh ? e_periodic_cb : 0)); 944 RESET (periodic, w, (w, at, interval, w->fh ? e_periodic_cb : 0));
917} 945}
918 946
919NV at (ev_periodic *w) 947NV at (ev_periodic *w)
920 CODE: 948 CODE:
921 RETVAL = w->at; 949 RETVAL = ev_periodic_at (w);
922 OUTPUT: 950 OUTPUT:
923 RETVAL 951 RETVAL
924 952
925MODULE = EV PACKAGE = EV::Idle PREFIX = ev_idle_ 953MODULE = EV PACKAGE = EV::Idle PREFIX = ev_idle_
926 954
995void DESTROY (ev_child *w) 1023void DESTROY (ev_child *w)
996 CODE: 1024 CODE:
997 STOP (child, w); 1025 STOP (child, w);
998 e_destroy (w); 1026 e_destroy (w);
999 1027
1000void set (ev_child *w, int pid) 1028void set (ev_child *w, int pid, int trace)
1001 CODE: 1029 CODE:
1002 RESET (child, w, (w, pid)); 1030 RESET (child, w, (w, pid, trace));
1003 1031
1004int pid (ev_child *w, int new_pid = 0)
1005 CODE:
1006{
1007 RETVAL = w->pid;
1008
1009 if (items > 1)
1010 RESET (child, w, (w, new_pid));
1011}
1012 OUTPUT:
1013 RETVAL
1014
1015
1016int rstatus (ev_child *w) 1032int pid (ev_child *w)
1017 ALIAS: 1033 ALIAS:
1018 rpid = 1 1034 rpid = 1
1035 rstatus = 2
1019 CODE: 1036 CODE:
1020 RETVAL = ix ? w->rpid : w->rstatus; 1037 RETVAL = ix == 0 ? w->pid
1038 : ix == 1 ? w->rpid
1039 : w->rstatus;
1021 OUTPUT: 1040 OUTPUT:
1022 RETVAL 1041 RETVAL
1023 1042
1024MODULE = EV PACKAGE = EV::Stat PREFIX = ev_stat_ 1043MODULE = EV PACKAGE = EV::Stat PREFIX = ev_stat_
1025 1044
1141 CODE: 1160 CODE:
1142 RETVAL = newSVsv (w->fh); 1161 RETVAL = newSVsv (w->fh);
1143 OUTPUT: 1162 OUTPUT:
1144 RETVAL 1163 RETVAL
1145 1164
1165void ev_embed_sweep (ev_embed *w)
1166 C_ARGS: e_loop (w), w
1167
1168MODULE = EV PACKAGE = EV::Async PREFIX = ev_async_
1169
1170void ev_async_start (ev_async *w)
1171 CODE:
1172 START (async, w);
1173
1174void ev_async_stop (ev_async *w)
1175 CODE:
1176 STOP (async, w);
1177
1178void DESTROY (ev_async *w)
1179 CODE:
1180 STOP (async, w);
1181 e_destroy (w);
1182
1183void ev_async_send (ev_async *w)
1184 C_ARGS: e_loop (w), w
1185
1186SV *ev_async_async_pending (ev_async *w)
1187 CODE:
1188 RETVAL = boolSV (ev_async_pending (w));
1189 OUTPUT:
1190 RETVAL
1191
1146MODULE = EV PACKAGE = EV::Loop PREFIX = ev_ 1192MODULE = EV PACKAGE = EV::Loop PREFIX = ev_
1147 1193
1148SV *new (SV *klass, unsigned int flags = 0) 1194SV *new (SV *klass, unsigned int flags = 0)
1149 CODE: 1195 CODE:
1150{ 1196{
1163 if (loop != evapi.default_loop) /* global destruction sucks */ 1209 if (loop != evapi.default_loop) /* global destruction sucks */
1164 ev_loop_destroy (loop); 1210 ev_loop_destroy (loop);
1165 1211
1166void ev_loop_fork (struct ev_loop *loop) 1212void ev_loop_fork (struct ev_loop *loop)
1167 1213
1214void ev_loop_verify (struct ev_loop *loop)
1215
1168NV ev_now (struct ev_loop *loop) 1216NV ev_now (struct ev_loop *loop)
1217
1218void ev_now_update (struct ev_loop *loop)
1169 1219
1170void ev_set_io_collect_interval (struct ev_loop *loop, NV interval) 1220void ev_set_io_collect_interval (struct ev_loop *loop, NV interval)
1171 1221
1172void ev_set_timeout_collect_interval (struct ev_loop *loop, NV interval) 1222void ev_set_timeout_collect_interval (struct ev_loop *loop, NV interval)
1173 1223
1296 ev_fork_set (RETVAL); 1346 ev_fork_set (RETVAL);
1297 if (!ix) START (fork, RETVAL); 1347 if (!ix) START (fork, RETVAL);
1298 OUTPUT: 1348 OUTPUT:
1299 RETVAL 1349 RETVAL
1300 1350
1301ev_child *child (struct ev_loop *loop, int pid, SV *cb) 1351ev_child *child (struct ev_loop *loop, int pid, int trace, SV *cb)
1302 ALIAS: 1352 ALIAS:
1303 child_ns = 1 1353 child_ns = 1
1304 CODE: 1354 CODE:
1305 RETVAL = e_new (sizeof (ev_child), cb, ST (0)); 1355 RETVAL = e_new (sizeof (ev_child), cb, ST (0));
1306 ev_child_set (RETVAL, pid); 1356 ev_child_set (RETVAL, pid, trace);
1307 if (!ix) START (child, RETVAL); 1357 if (!ix) START (child, RETVAL);
1308 OUTPUT: 1358 OUTPUT:
1309 RETVAL 1359 RETVAL
1310 1360
1311ev_stat *stat (struct ev_loop *loop, SV *path, NV interval, SV *cb) 1361ev_stat *stat (struct ev_loop *loop, SV *path, NV interval, SV *cb)
1317 ev_stat_set (RETVAL, SvPVbyte_nolen (RETVAL->fh), interval); 1367 ev_stat_set (RETVAL, SvPVbyte_nolen (RETVAL->fh), interval);
1318 if (!ix) START (stat, RETVAL); 1368 if (!ix) START (stat, RETVAL);
1319 OUTPUT: 1369 OUTPUT:
1320 RETVAL 1370 RETVAL
1321 1371
1322ev_embed *embed (struct ev_loop *loop, struct ev_loop *other, SV *cb = &PL_sv_undef) 1372ev_embed *embed (struct ev_loop *loop, struct ev_loop *other, SV *cb = 0)
1323 ALIAS: 1373 ALIAS:
1324 embed_ns = 1 1374 embed_ns = 1
1325 CODE: 1375 CODE:
1326{ 1376{
1327 if (!(ev_backend (other) & ev_embeddable_backends ())) 1377 if (!(ev_backend (other) & ev_embeddable_backends ()))
1328 croak ("passed loop is not embeddable via EV::embed,"); 1378 croak ("passed loop is not embeddable via EV::embed,");
1329 1379
1330 RETVAL = e_new (sizeof (ev_embed), cb, ST (0)); 1380 RETVAL = e_new (sizeof (ev_embed), cb, ST (0));
1331 RETVAL->fh = newSVsv (ST (1)); 1381 RETVAL->fh = newSVsv (ST (1));
1332 ev_embed_set (RETVAL, other); 1382 ev_embed_set (RETVAL, other);
1333
1334 if (!SvOK (cb)) ev_set_cb (RETVAL, 0);
1335
1336 if (!ix) START (embed, RETVAL); 1383 if (!ix) START (embed, RETVAL);
1337} 1384}
1385 OUTPUT:
1386 RETVAL
1387
1388ev_async *async (struct ev_loop *loop, SV *cb)
1389 ALIAS:
1390 async_ns = 1
1391 CODE:
1392 RETVAL = e_new (sizeof (ev_async), cb, ST (0));
1393 ev_async_set (RETVAL);
1394 if (!ix) START (async, RETVAL);
1338 OUTPUT: 1395 OUTPUT:
1339 RETVAL 1396 RETVAL
1340 1397
1341void once (struct ev_loop *loop, SV *fh, int events, SV *timeout, SV *cb) 1398void once (struct ev_loop *loop, SV *fh, int events, SV *timeout, SV *cb)
1342 CODE: 1399 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines