Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

memref.h

00001  /*
00002   * plint/data/memref.h : memory/reference handling
00003   * 
00004   * Time-stamp: <2002-10-07 05:57:03 gseba>
00005   * 
00006   * Copyright (C) Sebastian Glita, email: gseba@users.sourceforge.net
00007   * 
00008   * This file is part of plint.
00009   * 
00010   * plint is free software; you can  redistribute it and/or modify it under the
00011   * terms of the  GNU General Public License as published  by the Free Software
00012   * Foundation; either version 2, or (at your option) any later version.
00013   *
00014   * plint  is distributed  in the  hope  that it  will be  useful, but  WITHOUT
00015   * ANY  WARRANTY; without  even  the implied  warranty  of MERCHANTABILITY  or
00016   * FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU  General Public License for
00017   * more details.
00018   * 
00019   * You should  have received a  copy of the  GNU General Public  License along
00020   * with  plint; see  the file  COPYING.  If  not, write  to the  Free Software
00021   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA USA.
00022   *
00023   */
00024 
00025 #ifndef PLINT_DATA_TYPE_H
00026 #error Dont include me directly, but through data/type.h
00027 #endif
00028 
00034 #define plint_ref_var(__r__) (*(__r__))
00035 #define plint_var_ref(__v__) (&(__v__))
00036 
00037 #define plint_mem_typ(__m__) ((__m__)->typ)
00038 #define plint_mem_new plint_ptr_new
00039 #define plint_mem_dup plint_ptr_dup
00040 #define plint_mem_fre plint_ptr_fre
00041 #define PLINT_MEM_NEW PLINT_PTR_NEW
00042 #define plint_var_mem plint_var_val
00043 
00044 /* case: plint_mem_type == PLINT_var */
00045 #define plint_mem_var(__m__) ((__m__)->val.var)
00046 
00047 /* case: plint_mem_type == PLINT_tab */
00048 #define plint_mem_tab(__m__) ((__m__)->val.tab)
00049 
00050 /* case: plint_mem_type == PLINT_hsh */
00051 #define plint_mem_hsh(__m__) ((__m__)->val.hsh)
00052 
00053 typedef struct
00054 {
00055 
00056   plint_mem_t mem;
00057   plint_ref_t ref;
00058   plint_var_t var;
00059 
00060 #define plint_mrv_mem(__x__) ((__x__).mem)
00061 #define plint_mrv_ref(__x__) ((__x__).ref)
00062 #define plint_mrv_var(__x__) ((__x__).var)
00063 
00064 } plint_mrv_t;
00065 
00066 __BEGIN_DECLS
00067 plint_ite_t plint_mem_cpy(plint_ite_t ite);
00068 __END_DECLS
00069 

Generated on Thu Jan 9 19:02:38 2003 for plint by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002