pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin.cmod,v 1.190 2006/07/05 19:21:29 mast Exp $ + || $Id: builtin.cmod,v 1.191 2006/07/05 19:24:18 mast Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin.cmod:542:    mapping_string_insert (params, str, &get); \    } \    } while (0)      #define HANDLE_FLOAT_FACTOR(NAME, VAR) \    HANDLE_PARAM (NAME, { \    if (set->type != T_FLOAT || \    set->u.float_number < 0.0 || set->u.float_number > 1.0) \    SIMPLE_BAD_ARG_ERROR ("Pike.gc_parameters", 1, \    "float between 0.0 and 1.0 for " NAME); \ -  VAR = set->u.float_number; \ +  VAR = DO_NOT_WARN ((double) set->u.float_number); \    }, { \    get.type = T_FLOAT; \ -  get.u.float_number = VAR; \ +  get.u.float_number = DO_NOT_WARN ((FLOAT_TYPE) VAR); \    });       HANDLE_PARAM ("enabled", {    if (set->type != T_INT || set->u.integer < -1 || set->u.integer > 1)    SIMPLE_BAD_ARG_ERROR ("Pike.gc_parameters", 1,    "integer in the range -1..1 for 'enabled'");    if (gc_enabled != set->u.integer) {    if (gc_enabled > 0)    gc_enabled = set->u.integer;    else {
pike.git/src/builtin.cmod:2027:    /* NOTE: from and to are only kept for _encode()'s use. */    CVAR struct array *from;    CVAR struct array *to;       /*! @decl void create(array(string)|mapping(string:string)|void from, @    *! array(string)|string|void to)    */    PIKEFUN void create(array(string)|mapping(string:string)|void from_arg,    array(string)|string|void to_arg)    { -  int i; -  +     if (THIS->from) free_array(THIS->from);    if (THIS->to) free_array(THIS->to);    if (THIS->ctx.v) free_replace_many_context(&THIS->ctx);       if (!args) {    push_int(0);    return;    }    if (from_arg && from_arg->type == T_MAPPING) {    if (to_arg) {
pike.git/src/builtin.cmod:2456:    i %= output.s->len+1;    string_builder_putchar( &output, n );    if (i != output.s->len-1)    switch (output.s->size_shift) {    case 0:    {    p_wchar0 *s = STR0(output.s);    INT_TYPE p = output.s->len;    while (--p>i)    s[p] = s[p-1]; -  s[p] = n; +  s[p] = DO_NOT_WARN ((p_wchar0) n);    }    break;    case 1:    {    p_wchar1 *s = STR1(output.s);    INT_TYPE p = output.s->len;    while (--p>i)    s[p] = s[p-1]; -  s[p] = n; +  s[p] = DO_NOT_WARN ((p_wchar1) n);    }    break;    case 2:    {    p_wchar2 *s = STR2(output.s);    INT_TYPE p = output.s->len;    while (--p>i)    s[p] = s[p-1]; -  s[p] = n; +  s[p] = DO_NOT_WARN ((p_wchar2) n);    }    break;    default:    Pike_fatal("Illegal shift size!\n");    }    i++;    }       RETURN finish_string_builder( &output );    }