Replaced error with warn. The problem itself remains.
This commit is contained in:
parent
4088792f41
commit
830f323166
|
@ -15,39 +15,51 @@ step 4
|
|||
s48_value df_compile_re(s48_value g1, s48_value g2, s48_value mv_vec)
|
||||
{
|
||||
extern int compile_re(s48_value , int , regex_t* *);
|
||||
s48_value ret1;
|
||||
s48_value ret1 = S48_FALSE;
|
||||
S48_DECLARE_GC_PROTECT(2);
|
||||
int r1;
|
||||
regex_t* r2;
|
||||
regex_t* r2 = 0;
|
||||
|
||||
|
||||
|
||||
S48_GC_PROTECT_2(mv_vec,ret1);
|
||||
r1 = compile_re(g1, EXTRACT_BOOLEAN(g2), &r2);
|
||||
ret1 = s48_enter_integer(r1);
|
||||
SetAlienVal(S48_VECTOR_REF(mv_vec,0),(long) r2);//simple-assign
|
||||
S48_GC_UNPROTECT();
|
||||
return ret1;
|
||||
}
|
||||
|
||||
s48_value df_re_search(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5, s48_value g6, s48_value g7)
|
||||
{
|
||||
extern s48_value re_search(const regex_t *, s48_value , int , s48_value , int , s48_value , s48_value );
|
||||
s48_value ret1;
|
||||
s48_value ret1 = S48_FALSE;
|
||||
S48_DECLARE_GC_PROTECT(1);
|
||||
s48_value r1;
|
||||
|
||||
|
||||
|
||||
S48_GC_PROTECT_1(ret1);
|
||||
r1 = re_search((const regex_t *)AlienVal(g1), g2, s48_extract_integer(g3), g4, s48_extract_integer(g5), g6, g7);
|
||||
ret1 = r1;
|
||||
S48_GC_UNPROTECT();
|
||||
return ret1;
|
||||
}
|
||||
|
||||
s48_value df_re_errint2str(s48_value g1, s48_value g2, s48_value mv_vec)
|
||||
{
|
||||
extern const char *re_errint2str(int , const regex_t *);
|
||||
s48_value ret1;
|
||||
s48_value ret1 = S48_FALSE;
|
||||
S48_DECLARE_GC_PROTECT(2);
|
||||
const char *r1;
|
||||
|
||||
|
||||
|
||||
S48_GC_PROTECT_2(mv_vec,ret1);
|
||||
r1 = re_errint2str(s48_extract_integer(g1), (const regex_t *)AlienVal(g2));
|
||||
ret1 = S48_VECTOR_REF(mv_vec,0);
|
||||
SetAlienVal(S48_CAR(ret1),(long) r1); S48_SET_CDR(ret1,strlen_or_false(r1));//str-and-len
|
||||
S48_GC_UNPROTECT();
|
||||
return ret1;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,12 +148,12 @@
|
|||
(define (free-bytes the-cre)
|
||||
(if (cre:bytes the-cre)
|
||||
(%free-re (cre:bytes the-cre))
|
||||
(error "free-bytes called on #f")))
|
||||
(warn "free-bytes called on #f")))
|
||||
|
||||
(define (free-bytes/nm the-cre)
|
||||
(if (cre:bytes the-cre)
|
||||
(%free-re (cre:bytes/nm the-cre))
|
||||
(error "free-bytes called on #f")))
|
||||
(warn "free-bytes/nm called on #f")))
|
||||
|
||||
(define (register-re-c-struct:bytes cre)
|
||||
(add-finalizer! cre free-bytes))
|
||||
|
|
Loading…
Reference in New Issue