Module: Readapt::Breakpoints
- Defined in:
- ext/readapt/breakpoints.c
Class Method Summary collapse
Class Method Details
.clear ⇒ Object
62 63 64 65 66 67 |
# File 'ext/readapt/breakpoints.c', line 62
static VALUE breakpoints_clear_s(VALUE self)
{
lt_del_lookup_table(ht);
ht = lt_new();
return Qnil;
}
|
.delete(file) ⇒ Object
33 34 35 36 |
# File 'ext/readapt/breakpoints.c', line 33
static VALUE breakpoints_delete_s(VALUE self, VALUE file)
{
return Qnil;
}
|
.match(file, line) ⇒ Object
57 58 59 60 |
# File 'ext/readapt/breakpoints.c', line 57
static VALUE breakpoints_match_s(VALUE self, VALUE file, VALUE line)
{
return breakpoints_match(StringValueCStr(file), NUM2LONG(line)) == 0 ? Qfalse : Qtrue;
}
|
.set(file, lines) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'ext/readapt/breakpoints.c', line 12
static VALUE breakpoints_set_s(VALUE self, VALUE file, VALUE lines)
{
long length = NUM2LONG(rb_funcall(lines, rb_intern("length"), 0));
long *ll;
long i;
ll = malloc(sizeof(long) * length);
for (i = 0; i < length; i++)
{
ll[i] = NUM2LONG(rb_ary_entry(lines, i));
}
lt_insert(ht, StringValueCStr(file), ll, length);
free(ll);
return Qnil;
}
|