int.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 __INT_H__
00017 #define __INT_H__
00018 
00019 
00032 typedef struct PmInt_s
00033 {
00035     PmObjDesc_t od;
00036 
00038     int32_t val;
00039 } PmInt_t,
00040  *pPmInt_t;
00041 
00042 
00052 PmReturn_t int_dup(pPmObj_t pint, pPmObj_t *r_pint);
00053 
00061 PmReturn_t int_new(int32_t val, pPmObj_t *r_pint);
00062 
00071 PmReturn_t int_positive(pPmObj_t, pPmObj_t *r_pint);
00072 
00082 PmReturn_t int_negative(pPmObj_t pobj, pPmObj_t *r_pint);
00083 
00092 PmReturn_t int_bitInvert(pPmObj_t pobj, pPmObj_t *r_pint);
00093 
00094 #ifdef HAVE_PRINT
00095 
00102 PmReturn_t int_print(pPmObj_t pint);
00103 
00109 PmReturn_t int_printHexByte(uint8_t b);
00110 
00116 PmReturn_t _int_printHex(intptr_t n);
00117 
00123 PmReturn_t int_printHex(pPmObj_t pint);
00124 #endif /* HAVE_PRINT */
00125 
00134 PmReturn_t int_pow(pPmObj_t px, pPmObj_t py, pPmObj_t *r_pn);
00135 
00136 #endif /* __INT_H__ */

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