pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1567:    } \    n = MINIMUM(n*2+1,MAXVARS(NUMTYPE)); \    } while (m + cnt > n); \    m = n; \    tmp = mexec_realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \    state->new_program->NAME=tmp; \    } \ -  MEMCPY(state->new_program->NAME + \ +  memcpy(state->new_program->NAME + \    state->new_program->PIKE_CONCAT(num_,NAME), \    ARG, sizeof(TYPE) * cnt); \    state->new_program->PIKE_CONCAT(num_,NAME) += cnt; \   } \   void PIKE_CONCAT(add_to_,NAME) (ARGTYPE ARG) { \    PIKE_CONCAT(low_add_to_,NAME) ( Pike_compiler, ARG ); \   }   #else /* !PIKE_USE_MACHINE_CODE */   #define BAR(NUMTYPE,TYPE,ARGTYPE,NAME) \    FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \
pike.git/src/program.c:1599:    } \    n = MINIMUM(n*2+1,MAXVARS(NUMTYPE)); \    } while (m + cnt > n); \    m = n; \    tmp = realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \    state->new_program->NAME=tmp; \    } \ -  MEMCPY(state->new_program->NAME + \ +  memcpy(state->new_program->NAME + \    state->new_program->PIKE_CONCAT(num_,NAME), \    ARG, sizeof(TYPE) * cnt); \    state->new_program->PIKE_CONCAT(num_,NAME) += cnt; \   }   #endif /* PIKE_USE_MACHINE_CODE */      /* Funny guys use the uppermost value for nonexistant variables and    the like. Hence -2 and not -1. Y2K. */   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \   void PIKE_CONCAT(low_add_to_,NAME) (struct program_state *state, \
pike.git/src/program.c:2368:    size=0;      #ifdef PIKE_USE_MACHINE_CODE    /* As above. */   #define BAR(NUMTYPE,TYPE,ARGTYPE,NAME)   #endif /* PIKE_USE_MACHINE_CODE */      #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    size=DO_ALIGN(size, ALIGNOF(TYPE)); \    if (p->PIKE_CONCAT (num_, NAME)) \ -  MEMCPY(data+size,p->NAME,p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0])); \ +  memcpy(data+size,p->NAME,p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0])); \    PIKE_CONCAT(RELOCATE_,NAME)(p, (TYPE *)(data+size)); \    dmfree(p->NAME); \    p->NAME=(TYPE *)(data+size); \    size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]);   #include "program_areas.h"       p->total_size=size + sizeof(struct program);       p->flags |= PROGRAM_OPTIMIZED;    make_program_executable(p);
pike.git/src/program.c:7695:       else{    char *buffer;    if (malloced)    buffer = malloc (len + 1);    else {    buffer = buf;    if (len > NELEM (buf) - 1)    len = NELEM (buf) - 1;    } -  MEMCPY (buffer, file, len); +  memcpy (buffer, file, len);    buffer[len] = 0;    return buffer;    }   }      /* Same as low_get_program_line but returns a plain char *. It's    * malloced if the malloced flag is set, otherwise it's a pointer to a    * static buffer which might be clobbered by later calls.    *    * This function is useful when the shared string table has been freed