File: pfuncobject.h

package info (click to toggle)
psyco 1.5.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,864 kB
  • ctags: 3,295
  • sloc: ansic: 24,491; python: 5,573; perl: 1,309; makefile: 166; sh: 1
file content (37 lines) | stat: -rw-r--r-- 1,391 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 /***************************************************************/
/***            Psyco equivalent of funcobject.h               ***/
 /***************************************************************/

#ifndef _PSY_FUNCOBJECT_H
#define _PSY_FUNCOBJECT_H


#include "pobject.h"
#include "pabstract.h"


#define FUNC_code      DEF_FIELD(PyFunctionObject, PyObject*, func_code, OB_type)
#define FUNC_globals   DEF_FIELD(PyFunctionObject, PyObject*, func_globals,  \
						FUNC_code)
#define FUNC_defaults  DEF_FIELD(PyFunctionObject, PyObject*, func_defaults, \
						FUNC_globals)
#define iFUNC_CODE     FIELD_INDEX(FUNC_code)
#define iFUNC_GLOBALS  FIELD_INDEX(FUNC_globals)
#define iFUNC_DEFAULTS FIELD_INDEX(FUNC_defaults)
#define FUNC_TOTAL     FIELDS_TOTAL(FUNC_defaults)


EXTERNFN vinfo_t* pfunction_call(PsycoObject* po, vinfo_t* func,
                                 vinfo_t* arg, vinfo_t* kw);
EXTERNFN vinfo_t* pfunction_simple_call(PsycoObject* po, PyObject* f,
					vinfo_t* arg, bool allow_inline);


/***************************************************************/
/* virtual functions.                                          */
/* 'fdefaults' may be NULL.                                    */
EXTERNFN vinfo_t* PsycoFunction_New(PsycoObject* po, vinfo_t* fcode,
                                    vinfo_t* fglobals, vinfo_t* fdefaults);


#endif /* _PSY_FUNCOBJECT_H */