pike.git / src / pike_macros.h

version» Context lines:

pike.git/src/pike_macros.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: pike_macros.h,v 1.24 2001/05/14 03:29:36 hubbe Exp $ +  * $Id: pike_macros.h,v 1.25 2001/07/20 19:18:09 mast Exp $    */   #ifndef MACROS_H   #define MACROS_H      #include <global.h>      #ifdef HAVE_SYS_PARAM_H   #include <sys/param.h>   #endif   
pike.git/src/pike_macros.h:73:    free_item(p); \   }while(0)      /* This variant never leaves p pointing at a deallocated block, as the    * one above can do. I.e. it frees a ref to the item p points at, and    * sets p to the same or next item with references, or sets it to    * zero. */   /* how can SET_NEXT_AND_FREE leave *next* pointing to a deallocated block?    * -Hubbe    */ + /* Afaik it doesn't, but it leaves no value that is usable for the +  * purposes this macro was made for. /mast */   #define FREE_AND_GET_REFERENCED(p, item_type, free_item) do { \    item_type *next; \    while (1) { \    if (p->refs > 1) { \    free_item(p); \    break; \    } \    if (!(next = p->next)) { \    free_item(p); \    p = 0; \