pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:684:    UNSET_ONERROR(fe);    low_set_index(t,len,0);    return t;   }      static struct pike_string * make_static_string(const char * str, size_t len,    enum size_shift shift)   {    struct pike_string * t = ba_alloc(&string_allocator);   #ifdef PIKE_DEBUG -  gc_init_marker(&t->m); +  gc_init_marker(t);   #endif    t->flags = STRING_NOT_HASHED|STRING_NOT_SHARED;    t->size_shift = shift;    t->alloc_type = STRING_ALLOC_STATIC;    t->struct_type = STRING_STRUCT_STRING;    t->str = (char *)str;    t->refs = 0;    t->len = len;    add_ref(t); /* For DMALLOC */   
pike.git/src/stralloc.c:736:    enum size_shift shift)   {    struct pike_string *s;    ptrdiff_t h = StrHash(str, len);       s = internal_findstring(str,len,shift,h);       if (!s) {    s = ba_alloc(&string_allocator);   #ifdef PIKE_DEBUG -  gc_init_marker(&s->m); +  gc_init_marker(s);   #endif       s->flags = STRING_NOT_HASHED|STRING_NOT_SHARED;    s->size_shift = shift;    s->alloc_type = STRING_ALLOC_MALLOC;    s->struct_type = STRING_STRUCT_STRING;    s->str = str;    s->refs = 0;    s->len = len;    add_ref(s);
pike.git/src/stralloc.c:1880:    void *strstart = s->str+(start<<shift);    size_t hval = low_do_hash(strstart,len,shift);    if( (existing =    internal_findstring(strstart, len, shift, hval)) )    {    add_ref(existing);    return existing;    }    res = ba_alloc(&substring_allocator);   #ifdef PIKE_DEBUG -  gc_init_marker(&res->str.m); +  gc_init_marker(&res->str);   #endif    res->parent = s;    s->flags |= STRING_IS_LOCKED; /* Make sure the string data isn't reallocated. */    add_ref(s);    existing = &res->str;       existing->flags = STRING_NOT_SHARED;    existing->size_shift = shift;    existing->alloc_type = STRING_ALLOC_SUBSTRING;    existing->struct_type = STRING_STRUCT_SUBSTRING;