Branch: Tag:

2014-06-28

2014-06-28 07:54:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Added macro SET_SVAL_TYPE_DC().

This is to be used to set the svalue type when we don't care about
the subtype. It may clear the subtype depending on the C-compiler.

202:   #endif /* PIKE_DEBUG */      #ifdef __CHECKER__ - #define SET_SVAL_TYPE_SUBTYPE_CHECKER(S,T,U) SET_SVAL_TYPE(S,Y);SET_SVAL_SUBTYPE(S,U) + #define SET_SVAL_TYPE_CHECKER(S,T) SET_SVAL_TYPE_SUBTYPE(S,T,0)   #else - #define SET_SVAL_TYPE_SUBTYPE_CHECKER(S,T,U) SET_SVAL_TYPE(S,T) + #define SET_SVAL_TYPE_CHECKER(S,T) SET_SVAL_TYPE_DC(S,T)   #endif      #define pop_stack() do{ free_svalue(--Pike_sp); debug_check_stack(); }while(0)
272:    struct program *_=(P); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_PROGRAM,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_PROGRAM); \    _sp_->u.program=_; \    }while(0)   
292:   #define push_obj_index(I) do{ \    int _=(I); \    struct svalue *_sp_ = Pike_sp++; \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, T_OBJ_INDEX,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, T_OBJ_INDEX); \    _sp_->u.identifier=_; \    }while(0)   
300:    struct mapping *_=(M); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_MAPPING,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_MAPPING); \    _sp_->u.mapping=_; \    }while(0)   
308:    struct array *_=(A); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_ARRAY,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_ARRAY); \    _sp_->u.array=_ ; \    }while(0)   
318:    struct multiset *_=(L); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_MULTISET,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_MULTISET); \    _sp_->u.multiset=_; \    }while(0)   
340:    struct pike_type *_=(S); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_TYPE,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_TYPE); \    _sp_->u.type=_; \    }while(0)   
358:   #define push_float(F) do{ \    FLOAT_TYPE _=(F); \    struct svalue *_sp_ = Pike_sp++; \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_FLOAT,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_FLOAT); \    _sp_->u.float_number=_; \    }while(0)   
388:    struct program *_=(P); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_PROGRAM,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_PROGRAM); \    _sp_->u.program=_; \    }while(0)   
396:    struct mapping *_=(M); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_MAPPING,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_MAPPING); \    _sp_->u.mapping=_; \    }while(0)   
404:    struct array *_=(A); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_ARRAY,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_ARRAY); \    _sp_->u.array=_ ; \    }while(0)   
412:    struct multiset *_=(L); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \ -  SET_SVAL_TYPE_SUBTYPE_CHECKER(*_sp_, PIKE_T_MULTISET,0); \ +  SET_SVAL_TYPE_CHECKER(*_sp_, PIKE_T_MULTISET); \    _sp_->u.multiset=_; \    }while(0)