tuple.h

Go to the documentation of this file.
00001 /*
00002 # This file is Copyright 2003, 2006, 2007, 2009 Dean Hall.
00003 #
00004 # This file is part of the PyMite VM.
00005 # The PyMite VM is free software: you can redistribute it and/or modify
00006 # it under the terms of the GNU GENERAL PUBLIC LICENSE Version 2.
00007 #
00008 # The PyMite VM is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011 # A copy of the GNU GENERAL PUBLIC LICENSE Version 2
00012 # is seen in the file COPYING in this directory.
00013 */
00014 
00015 
00016 #ifndef __TUPLE_H__
00017 #define __TUPLE_H__
00018 
00019 
00032 typedef struct PmTuple_s
00033 {
00035     PmObjDesc_t od;
00036 
00043     int16_t length;
00044 
00046     pPmObj_t val[1];
00047 } PmTuple_t,
00048  *pPmTuple_t;
00049 
00050 
00051 #define tuple_copy(src, dest) tuple_replicate((src), 1, (dest))
00052 
00053 
00073 PmReturn_t tuple_loadFromImg(PmMemSpace_t memspace,
00074                              uint8_t const **paddr, pPmObj_t *r_ptuple);
00075 
00083 PmReturn_t tuple_new(uint16_t n, pPmObj_t *r_ptuple);
00084 
00095 PmReturn_t tuple_replicate(pPmObj_t ptup, int16_t n, pPmObj_t *r_ptuple);
00096 
00105 PmReturn_t tuple_getItem(pPmObj_t ptup, int16_t index, pPmObj_t *r_pobj);
00106 
00107 #ifdef HAVE_PRINT
00108 
00114 PmReturn_t tuple_print(pPmObj_t pobj);
00115 #endif /* HAVE_PRINT */
00116 
00117 #endif /* __TUPLE_H__ */

Generated on Wed Feb 24 13:37:02 2010 for Python-on-a-chip by  doxygen 1.5.9