Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / include / python2.4 / intobject.h
CommitLineData
86530b38
AT
1#ifndef Py_INTOBJECT_H
2#define Py_INTOBJECT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7typedef struct {
8 PyObject_HEAD
9 long ob_ival;
10} PyIntObject;
11
12PyAPI_DATA(PyTypeObject) PyInt_Type;
13
14#define PyInt_Check(op) PyObject_TypeCheck(op, &PyInt_Type)
15#define PyInt_CheckExact(op) ((op)->ob_type == &PyInt_Type)
16
17PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int);
18#ifdef Py_USING_UNICODE
19PyAPI_FUNC(PyObject *) PyInt_FromUnicode(Py_UNICODE*, int, int);
20#endif
21PyAPI_FUNC(PyObject *) PyInt_FromLong(long);
22PyAPI_FUNC(long) PyInt_AsLong(PyObject *);
23PyAPI_FUNC(unsigned long) PyInt_AsUnsignedLongMask(PyObject *);
24#ifdef HAVE_LONG_LONG
25PyAPI_FUNC(unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
26#endif
27
28PyAPI_FUNC(long) PyInt_GetMax(void);
29
30/* Macro, trading safety for speed */
31#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
32
33/* These aren't really part of the Int object, but they're handy; the protos
34 * are necessary for systems that need the magic of PyAPI_FUNC and that want
35 * to have stropmodule as a dynamically loaded module instead of building it
36 * into the main Python shared library/DLL. Guido thinks I'm weird for
37 * building it this way. :-) [cjh]
38 */
39PyAPI_FUNC(unsigned long) PyOS_strtoul(char *, char **, int);
40PyAPI_FUNC(long) PyOS_strtol(char *, char **, int);
41
42#ifdef __cplusplus
43}
44#endif
45#endif /* !Py_INTOBJECT_H */