pike.git / src / post_modules / _Regexp_PCRE / pcre_glue.cmod

version» Context lines:

pike.git/src/post_modules/_Regexp_PCRE/pcre_glue.cmod:80:    PIKEFUN void create(string pattern,    void|int options,    void|object table)    {    struct object *table=NULL;    const char *errptr;    int erroffset;       if (THIS->pattern) { free_string(THIS->pattern); THIS->pattern=NULL; }    THIS->pattern = pattern; -  add_ref(THIS->pattern); +  add_ref(pattern);       if (THIS->re) (*pcre_free)(THIS->re); /* -> free() usually */    if (THIS->extra) (*pcre_free)(THIS->extra); /* -> free() usually */    THIS->extra=NULL;       THIS->re=pcre_compile( -  THIS->pattern->str, +  pattern->str,    options ? options->u.integer : 0,    &errptr,&erroffset,    NULL /* table */ );       if (!THIS->re)    Pike_error("error calling pcre_compile [%d]: %s\n",    erroffset,errptr);    }       /*! @decl object study()