pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:3931:    } else {    *result_type = NULL;    }    return 1;   }   #define lookup_marker(REMAP, M, F, RES) (lookup_marker(REMAP, M, F, RES)?(debug_malloc_pass(*(RES)),1):0)      static void store_marker(struct remap_state *remap, int marker,    struct pike_type *value, enum pt_remap_flags flags)   { -  struct svalue key, val; +  struct svalue key, val, *old; +  struct pike_type *both = NULL;    int marker_set = !!(flags & PT_FLAG_REMAP_SWAP_MARKERS);       if (!remap || !marker) return;       if (!remap->markers[marker_set]) {    remap->markers[marker_set] = allocate_mapping(10);    }       SET_SVAL(key, T_INT, NUMBER_NUMBER, integer, marker); -  +  old = low_mapping_lookup(remap->markers[marker_set], &key);    if (value) { -  +  if (old && (TYPEOF(*old) == T_TYPE)) { +  value = both = or_pike_types(old->u.type, value, 0); +  }    SET_SVAL(val, T_TYPE, 0, type, value); -  } else { +  } else if (!old) {    SET_SVAL(val, T_INT, NUMBER_NUMBER, integer, 0); -  +  } else { +  val = *old;    }    mapping_insert(remap->markers[marker_set], &key, &val); -  +  free_type(both);   }   #define store_marker(REMAP, M, T, F) store_marker(REMAP, M, debug_malloc_pass(T), F)      /**    * Copy marker assignments from remap->markers to    * their corresponding T_ASSIGN nodes (aka backpatch).    *    * Leave the result on the type stack.    */   static void push_and_fixup_markers(struct pike_type *t,