pike.git / src / modules / Gz / zlibmod.c

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:180:    if (GET_TYPE(INT, "strategy")) strategy = tmp->u.integer;    if (GET_TYPE(INT, "window_size"))    {    wbits = tmp->u.integer;    if (wbits == 0) wbits = 15;    if (wbits < 8 || wbits > 15)    Pike_error("Invalid window size for gz_deflate->create().\n");    }    if (GET_TYPE(STRING, "dictionary"))    { +  if (tmp->u.string->size_shift) +  Pike_error("dictionary cannot be a wide string in " +  "gz_deflate->create().\n");    THIS->dict = tmp->u.string;    add_ref(THIS->dict);    }    if (GET_TYPE(INT, "level"))    {    THIS->level = tmp->u.integer;    goto LVL_CHECK;    }    } else {    if(TYPEOF(sp[-args]) != T_INT)
pike.git/src/modules/Gz/zlibmod.c:201:    THIS->level=sp[-args].u.integer;   LVL_CHECK:    if( THIS->level < 0 )    {    wbits = -wbits;    THIS->level = -THIS->level;    }    if(THIS->level < Z_NO_COMPRESSION ||    THIS->level > Z_BEST_COMPRESSION)    { -  Pike_error("Compression level out of range for gz_deflate->create()\n"); +  Pike_error("Compression level out of range for " +  "gz_deflate->create()\n");    }    }    }       if(args>1)    {    if(TYPEOF(sp[1-args]) != T_INT)    Pike_error("Bad argument 2 to gz->create()\n");    strategy=sp[1-args].u.integer;    if(strategy != Z_DEFAULT_STRATEGY &&
pike.git/src/modules/Gz/zlibmod.c:677:       THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=(void *)THIS;    if( args && TYPEOF(Pike_sp[-1]) == PIKE_T_MAPPING)    {    struct mapping *m = Pike_sp[-1].u.mapping;    struct svalue *tmp;       if (GET_TYPE(STRING, "dictionary")) { +  if (tmp->u.string->size_shift) +  Pike_error("dictionary cannot be a wide string in " +  "gz_inflate->create().\n");    THIS->dict = tmp->u.string;    add_ref(THIS->dict);    }    if (GET_TYPE(INT, "window_size"))    *tmp_p=inflateInit2(& THIS->gz, tmp->u.integer);    else    *tmp_p=inflateInit( &THIS->gz );    }    else    {