pike.git / src / post_modules / Shuffler / a_source_system_memory.c

version» Context lines:

pike.git/src/post_modules/Shuffler/a_source_system_memory.c:1:   /*   || 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: a_source_system_memory.c,v 1.8 2002/10/17 16:59:21 manual Exp $ + || $Id: a_source_system_memory.c,v 1.9 2003/03/14 15:57:49 grubba Exp $   */      #include "global.h"   #include "bignum.h"   #include "object.h"   #include "interpret.h"      #include <shuffler.h>      
pike.git/src/post_modules/Shuffler/a_source_system_memory.c:91:       if( !res->mem->data || !res->mem->len )    {    free(res);    return 0;    }       res->s.free_source = free_source;    res->s.get_data = get_data;    res->obj = s->u.object; -  res->obj->refs++; +  add_ref(res->obj);    res->offset = start;       if( len != -1 )    if( len > res->mem->len-start )    { -  res->obj->refs--; +  sub_ref(res->obj);    free(res);    return 0;    }    else    res->len = len;    else    res->len = len;       if( res->len <= 0 )    { -  res->obj->refs--; +  sub_ref(res->obj);    free(res);    return 0;    }    return (struct source *)res;   }      void source_system_memory_exit( )   {    if (shm_program) {    free_program( shm_program );    }   }      void source_system_memory_init( )   {   }