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

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:514:    case PIKE_T_OBJECT:    {    enum memobj_type t = get_memory_object_memory(data_arg->u.object,    &data.ptr, &data.len,    &data.shift);    if (t != MEMOBJ_NONE)    break;    // fall through    }    default: -  SIMPLE_BAD_ARG_ERROR("compress", 1, "string|String.Buffer|System.Memory|Stdio.Buffer"); +  SIMPLE_ARG_TYPE_ERROR("compress", 1, "string|String.Buffer|System.Memory|Stdio.Buffer");    }    if (data.shift)    Pike_error("Cannot input wide string to compress\n");       if( !wbits )    wbits = 15;       if( raw )    wbits = -wbits;   
pike.git/src/modules/Gz/zlibmod.c:978:    case PIKE_T_OBJECT:    {    enum memobj_type t = get_memory_object_memory(Pike_sp[-args].u.object,    &data.ptr, &data.len,    &data.shift);    if (t != MEMOBJ_NONE)    break;    // fall through    }    default: -  SIMPLE_BAD_ARG_ERROR("uncompress", 1, "string|String.Buffer|System.Memory|Stdio.Buffer"); +  SIMPLE_ARG_TYPE_ERROR("uncompress", 1, "string|String.Buffer|System.Memory|Stdio.Buffer");    }    if (data.shift)    Pike_error("Cannot input wide string to uncompress\n");    if(args>1)    {    if(TYPEOF(Pike_sp[1-args]) == PIKE_T_INT)    raw = Pike_sp[1-args].u.integer;    else -  SIMPLE_BAD_ARG_ERROR("uncompress", 2, "int"); +  SIMPLE_ARG_TYPE_ERROR("uncompress", 2, "int");    }       initialize_buf(&buf);    SET_ONERROR(err, toss_buffer, &buf);    low_zlibmod_unpack(data, &buf, raw);    UNSET_ONERROR(err);       pop_n_elems(args);    push_string(low_free_buf(&buf));