Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 1 | #ifndef Py_OLDNAMES_H |
| 2 | #define Py_OLDNAMES_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
| 7 | /*********************************************************** |
| 8 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 9 | The Netherlands. |
| 10 | |
| 11 | All Rights Reserved |
| 12 | |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 13 | Permission to use, copy, modify, and distribute this software and its |
| 14 | documentation for any purpose and without fee is hereby granted, |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 15 | provided that the above copyright notice appear in all copies and that |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 16 | both that copyright notice and this permission notice appear in |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 17 | supporting documentation, and that the names of Stichting Mathematisch |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 18 | Centrum or CWI or Corporation for National Research Initiatives or |
| 19 | CNRI not be used in advertising or publicity pertaining to |
| 20 | distribution of the software without specific, written prior |
| 21 | permission. |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 22 | |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 23 | While CWI is the initial source for this software, a modified version |
| 24 | is made available by the Corporation for National Research Initiatives |
| 25 | (CNRI) at the Internet address ftp://ftp.python.org. |
| 26 | |
| 27 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 28 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 29 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 30 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 31 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 32 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 33 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 34 | PERFORMANCE OF THIS SOFTWARE. |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 35 | |
| 36 | ******************************************************************/ |
| 37 | |
| 38 | /* This file contains a bunch of #defines that make it possible to use |
| 39 | "old style" names (e.g. object) with the new style Python source |
| 40 | distribution. */ |
| 41 | |
| 42 | #define True Py_True |
| 43 | #define False Py_False |
| 44 | #define None Py_None |
| 45 | |
| 46 | /* typedef ANY *PyUnivPtr; */ |
| 47 | #define methodlist PyMethodDef |
Guido van Rossum | 6978503 | 1995-01-26 22:58:48 +0000 | [diff] [blame] | 48 | #define methodchain PyMethodChain |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 49 | |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 50 | #define Accesstype PyAccess_Type |
| 51 | #define is_accessobject PyAccess_Check |
| 52 | #define newaccessobject PyAccess_FromValue |
| 53 | #define getaccessvalue PyAccess_AsValue |
| 54 | #define setaccessvalue PyAccess_SetValue |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 55 | #define setaccessowner PyAccess_SetOwner |
| 56 | #define cloneaccessobject PyAccess_Clone |
| 57 | #define hasaccessvalue PyAccess_HasValue |
| 58 | #define Anynumbertype PyAnyNumber_Type |
| 59 | #define Anysequencetype PyAnySequence_Type |
| 60 | #define Anymappingtype PyAnyMapping_Type |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 62 | #define FalseObject _Py_ZeroStruct |
| 63 | #define NoObject _Py_NoneStruct |
| 64 | #define TrueObject _Py_TrueStruct |
| 65 | #define debugging Py_DebugFlag |
| 66 | #define gram _PyParser_Grammar |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 67 | #define threads_started _PyThread_Started |
| 68 | #define tok_name _PyParser_TokenNames |
| 69 | #define verbose Py_VerboseFlag |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 70 | #define suppress_print Py_SuppressPrintingFlag |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 71 | #define AccessError PyExc_AccessError |
| 72 | #define AttributeError PyExc_AttributeError |
| 73 | #define ConflictError PyExc_ConflictError |
| 74 | #define EOFError PyExc_EOFError |
Guido van Rossum | 7d4266e | 1997-02-14 22:53:12 +0000 | [diff] [blame] | 75 | #define FloatingPointError PyExc_FloatingPointError |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 76 | #define IOError PyExc_IOError |
| 77 | #define ImportError PyExc_ImportError |
| 78 | #define IndexError PyExc_IndexError |
| 79 | #define KeyError PyExc_KeyError |
| 80 | #define MemoryError PyExc_MemoryError |
| 81 | #define NameError PyExc_NameError |
| 82 | #define OverflowError PyExc_OverflowError |
| 83 | #define RuntimeError PyExc_RuntimeError |
| 84 | #define SyntaxError PyExc_SyntaxError |
| 85 | #define SystemError PyExc_SystemError |
| 86 | #define TypeError PyExc_TypeError |
| 87 | #define ValueError PyExc_ValueError |
| 88 | #define ZeroDivisionError PyExc_ZeroDivisionError |
| 89 | #define KeyboardInterrupt PyExc_KeyboardInterrupt |
| 90 | #define SystemExit PyExc_SystemExit |
| 91 | #define Floattype PyFloat_Type |
Guido van Rossum | b17d5de | 1996-01-12 00:50:33 +0000 | [diff] [blame] | 92 | #define Complextype PyComplex_Type |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 93 | #define Inttype PyInt_Type |
| 94 | #define Longtype PyLong_Type |
| 95 | #define Notype PyNothing_Type |
| 96 | #define Stringtype PyString_Type |
| 97 | #define Typetype PyType_Type |
| 98 | #define Listtype PyList_Type |
| 99 | #define Dicttype PyDict_Type |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 100 | #define Mappingtype PyDict_Type |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 101 | #define Tupletype PyTuple_Type |
| 102 | #define Filetype PyFile_Type |
| 103 | #define Classtype PyClass_Type |
| 104 | #define Functype PyFunction_Type |
| 105 | #define Instancemethodtype PyMethod_Type |
| 106 | #define Instancetype PyInstance_Type |
| 107 | #define Methodtype PyCFunction_Type |
| 108 | #define Moduletype PyModule_Type |
| 109 | #define Codetype PyCode_Type |
| 110 | #define Frametype PyFrame_Type |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 111 | #define Rangetype PyRange_Type |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 112 | #define floatobject PyFloatObject |
Guido van Rossum | b17d5de | 1996-01-12 00:50:33 +0000 | [diff] [blame] | 113 | #define complexobject PyComplexObject |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 114 | #define intobject PyIntObject |
| 115 | #define longobject PyLongObject |
| 116 | #define noobject PyNothingObject |
| 117 | #define object PyObject |
Guido van Rossum | d0c87ee | 1997-05-15 21:31:03 +0000 | [diff] [blame] | 118 | #define varobject PyVarObject |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 119 | #define stringobject PyStringObject |
| 120 | #define typeobject PyTypeObject |
| 121 | #define listobject PyListObject |
| 122 | #define dictobject PyDictObject |
| 123 | #define tupleobject PyTupleObject |
| 124 | #define fileobject PyFileObject |
| 125 | #define classobject PyClassObject |
| 126 | #define codeobject PyCodeObject |
| 127 | #define frameobject PyFrameObject |
| 128 | #define funcobject PyFunctionObject |
| 129 | #define instancemethodobject PyMethodObject |
| 130 | #define instanceobject PyInstanceObject |
| 131 | #define methodobject PyCFunctionObject |
| 132 | #define moduleobject PyModuleObject |
| 133 | #define number_methods PyNumberMethods |
| 134 | #define sequence_methods PySequenceMethods |
| 135 | #define mapping_methods PyMappingMethods |
| 136 | #define OB_HEAD PyObject_HEAD |
| 137 | #define OB_VARHEAD PyObject_VAR_HEAD |
| 138 | #define OB_HEAD_INIT PyObject_HEAD_INIT |
| 139 | #define NEWOBJ PyObject_NEW |
| 140 | #define NEWVAROBJ PyObject_NEW_VAR |
| 141 | #define PROTO Py_PROTO |
| 142 | #define FPROTO Py_FPROTO |
| 143 | #define NEW PyMem_NEW |
| 144 | #define RESIZE PyMem_RESIZE |
| 145 | #define DEL PyMem_DEL |
| 146 | #define XDEL PyMem_XDEL |
| 147 | #define BGN_SAVE Py_BEGIN_ALLOW_THREADS |
| 148 | #define RET_SAVE Py_BLOCK_THREADS |
| 149 | #define RES_SAVE Py_UNBLOCK_THREADS |
| 150 | #define END_SAVE Py_END_ALLOW_THREADS |
Guido van Rossum | 9e89f0a | 1995-02-07 15:26:59 +0000 | [diff] [blame] | 151 | #define callable PyCallable_Check |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 152 | #define is_floatobject PyFloat_Check |
Guido van Rossum | b17d5de | 1996-01-12 00:50:33 +0000 | [diff] [blame] | 153 | #define is_complexobject PyComplex_Check |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 154 | #define is_intobject PyInt_Check |
| 155 | #define is_longobject PyLong_Check |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 156 | #define is_stringobject PyString_Check |
| 157 | #define is_typeobject PyType_Check |
| 158 | #define is_listobject PyList_Check |
| 159 | #define is_dictobject PyDict_Check |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 160 | #define is_mappingobject PyDict_Check |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 161 | #define is_tupleobject PyTuple_Check |
| 162 | #define is_fileobject PyFile_Check |
| 163 | #define is_classobject PyClass_Check |
| 164 | #define is_codeobject PyCode_Check |
| 165 | #define is_frameobject PyFrame_Check |
| 166 | #define is_funcobject PyFunction_Check |
| 167 | #define is_instancemethodobject PyMethod_Check |
| 168 | #define is_instanceobject PyInstance_Check |
| 169 | #define is_methodobject PyCFunction_Check |
| 170 | #define is_moduleobject PyModule_Check |
| 171 | #define INCREF Py_INCREF |
| 172 | #define DECREF Py_DECREF |
| 173 | #define XINCREF Py_XINCREF |
| 174 | #define XDECREF Py_XDECREF |
| 175 | #define NEWREF _Py_NewReference |
| 176 | #define DELREF _Py_Dealloc |
| 177 | #define UNREF _Py_ForgetReference |
| 178 | #define cmpobject PyObject_Compare |
| 179 | #define getattr PyObject_GetAttrString |
| 180 | #define getattro PyObject_GetAttr |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 181 | #define hasattr PyObject_HasAttrString |
| 182 | #define hasattro PyObject_HasAttr |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 183 | #define hashobject PyObject_Hash |
| 184 | #define newobject _PyObject_New |
| 185 | #define newvarobject _PyObject_NewVar |
| 186 | #define printobject PyObject_Print |
| 187 | #define reprobject PyObject_Repr |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 188 | #define strobject PyObject_Str |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 189 | #define setattr PyObject_SetAttrString |
| 190 | #define setattro PyObject_SetAttr |
| 191 | #define testbool PyObject_IsTrue |
| 192 | #define PRINT_RAW Py_PRINT_RAW |
| 193 | #define float_buf_repr PyFloat_AsString |
| 194 | #define getfloatvalue PyFloat_AsDouble |
| 195 | #define GETFLOATVALUE PyFloat_AS_DOUBLE |
| 196 | #define newfloatobject PyFloat_FromDouble |
Guido van Rossum | b17d5de | 1996-01-12 00:50:33 +0000 | [diff] [blame] | 197 | #define newcomplexobject PyComplex_FromCComplex |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 198 | #define getintvalue PyInt_AsLong |
| 199 | #define GETINTVALUE PyInt_AS_LONG |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 200 | #define getmaxint PyInt_GetMax |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 201 | #define newintobject PyInt_FromLong |
| 202 | #define alloclongobject _PyLong_New |
| 203 | #define dgetlongvalue PyLong_AsDouble |
| 204 | #define dnewlongobject PyLong_FromDouble |
| 205 | #define getlongvalue PyLong_AsLong |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 206 | #define long_escan PyLong_FromString |
| 207 | #define long_scan(a, b) PyLong_FromString((a), (char **)0, (b)) |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 208 | #define newlongobject PyLong_FromLong |
| 209 | #define formatstring PyString_Format |
| 210 | #define getstringsize PyString_Size |
| 211 | #define getstringvalue PyString_AsString |
| 212 | #define GETSTRINGVALUE PyString_AS_STRING |
| 213 | #define joinstring PyString_Concat |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 214 | #define joinstring_decref PyString_ConcatAndDel |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 215 | #define newsizedstringobject PyString_FromStringAndSize |
| 216 | #define newstringobject PyString_FromString |
| 217 | #define resizestring _PyString_Resize |
| 218 | #define addlistitem PyList_Append |
| 219 | #define getlistitem PyList_GetItem |
| 220 | #define GETLISTITEM PyList_GET_ITEM |
| 221 | #define getlistsize PyList_Size |
| 222 | #define getlistslice PyList_GetSlice |
| 223 | #define inslistitem PyList_Insert |
| 224 | #define newlistobject PyList_New |
| 225 | #define setlistitem PyList_SetItem |
| 226 | #define setlistslice PyList_SetSlice |
| 227 | #define sortlist PyList_Sort |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 228 | #define reverselist PyList_Reverse |
| 229 | #define listtuple PyList_AsTuple |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 230 | #define dictinsert PyDict_SetItemString |
| 231 | #define dictlookup PyDict_GetItemString |
| 232 | #define dictremove PyDict_DelItemString |
| 233 | #define getmappingitems PyDict_Items |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 234 | #define getdictitems PyDict_Items |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 235 | #define getmappingkeys PyDict_Keys |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 236 | #define getdictkeys PyDict_Keys |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 237 | #define getmappingvalues PyDict_Values |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 238 | #define getdictvalues PyDict_Values |
| 239 | #define getmappingsize PyDict_Size |
| 240 | #define getdictsize PyDict_Size |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 241 | #define mappingclear PyDict_Clear |
| 242 | #define mappinggetnext PyDict_Next |
| 243 | #define mappinginsert PyDict_SetItem |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 244 | #define dict2insert PyDict_SetItem |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 245 | #define mappinglookup PyDict_GetItem |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 246 | #define dict2lookup PyDict_GetItem |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 247 | #define mappingremove PyDict_DelItem |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 248 | #define dict2remove PyDict_DelItem |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 249 | #define newmappingobject PyDict_New |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 250 | #define newdictobject PyDict_New |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 251 | #define gettupleitem PyTuple_GetItem |
| 252 | #define GETTUPLEITEM PyTuple_GET_ITEM |
Guido van Rossum | 599de5a | 1995-03-09 12:10:16 +0000 | [diff] [blame] | 253 | #define SETTUPLEITEM PyTuple_SET_ITEM |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 254 | #define gettuplesize PyTuple_Size |
| 255 | #define gettupleslice PyTuple_GetSlice |
| 256 | #define newtupleobject PyTuple_New |
| 257 | #define settupleitem PyTuple_SetItem |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 258 | #define resizetuple _PyTuple_Resize |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 259 | #define filegetline PyFile_GetLine |
| 260 | #define getfilefile PyFile_AsFile |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 261 | #define getfilename PyFile_Name |
| 262 | #define setfilebufsize PyFile_SetBufSize |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 263 | #define newfileobject PyFile_FromString |
| 264 | #define newopenfileobject PyFile_FromFile |
| 265 | #define softspace PyFile_SoftSpace |
| 266 | #define writeobject PyFile_WriteObject |
| 267 | #define writestring PyFile_WriteString |
| 268 | #define instancemethodgetclass PyMethod_Class |
| 269 | #define instancemethodgetfunc PyMethod_Function |
| 270 | #define instancemethodgetself PyMethod_Self |
| 271 | #define issubclass PyClass_IsSubclass |
| 272 | #define newclassobject PyClass_New |
| 273 | #define newinstancemethodobject PyMethod_New |
| 274 | #define newinstanceobject PyInstance_New |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 275 | #define instancebinop PyInstance_DoBinOp |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 276 | #define block PyTryBlock |
| 277 | #define extend_stack PyFrame_ExtendStack |
| 278 | #define newframeobject PyFrame_New |
| 279 | #define pop_block PyFrame_BlockPop |
| 280 | #define setup_block PyFrame_BlockSetup |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 281 | #define fast_2_locals PyFrame_FastToLocals |
| 282 | #define locals_2_fast PyFrame_LocalsToFast |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 283 | #define getfunccode PyFunction_GetCode |
| 284 | #define getfuncglobals PyFunction_GetGlobals |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 285 | #define getfuncargstuff PyFunction_GetArgStuff |
| 286 | #define setfuncargstuff PyFunction_SetArgStuff |
| 287 | #define mystrtol PyOS_strtol |
| 288 | #define mystrtoul PyOS_strtoul |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 289 | #define newfuncobject PyFunction_New |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 290 | #define newrangeobject PyRange_New |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 291 | #define method PyCFunction |
| 292 | #define findmethod Py_FindMethod |
Guido van Rossum | 6978503 | 1995-01-26 22:58:48 +0000 | [diff] [blame] | 293 | #define findmethodinchain Py_FindMethodInChain |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 294 | #define getmethod PyCFunction_GetFunction |
| 295 | #define getself PyCFunction_GetSelf |
Guido van Rossum | bebdc37 | 1995-07-26 17:58:29 +0000 | [diff] [blame] | 296 | #define getflags PyCFunction_GetFlags |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 297 | #define newmethodobject PyCFunction_New |
| 298 | #define getmoduledict PyModule_GetDict |
| 299 | #define getmodulename PyModule_GetName |
| 300 | #define newmoduleobject PyModule_New |
| 301 | #define addaccelerators PyGrammar_AddAccelerators |
| 302 | #define finddfa PyGrammar_FindDFA |
| 303 | #define labelrepr PyGrammar_LabelRepr |
| 304 | #define listtree PyNode_ListTree |
| 305 | #define addchild PyNode_AddChild |
| 306 | #define freetree PyNode_Free |
| 307 | #define newtree PyNode_New |
| 308 | #define addtoken PyParser_AddToken |
| 309 | #define delparser PyParser_Delete |
| 310 | #define newparser PyParser_New |
| 311 | #define parsefile PyParser_ParseFile |
| 312 | #define parsestring PyParser_ParseString |
| 313 | #define tok_1char PyToken_OneChar |
| 314 | #define tok_2char PyToken_TwoChars |
| 315 | #define tok_free PyTokenizer_Free |
| 316 | #define tok_get PyTokenizer_Get |
| 317 | #define tok_setupf PyTokenizer_FromFile |
| 318 | #define tok_setups PyTokenizer_FromString |
| 319 | #define compile PyNode_Compile |
| 320 | #define newcodeobject PyCode_New |
| 321 | #define call_object PyEval_CallObject |
| 322 | #define eval_code PyEval_EvalCode |
| 323 | #define flushline Py_FlushLine |
| 324 | #define getbuiltins PyEval_GetBuiltins |
| 325 | #define getglobals PyEval_GetGlobals |
| 326 | #define getlocals PyEval_GetLocals |
| 327 | #define getowner PyEval_GetOwner |
| 328 | #define getframe PyEval_GetFrame |
| 329 | #define getrestricted PyEval_GetRestricted |
| 330 | #define init_save_thread PyEval_InitThreads |
| 331 | #define printtraceback PyErr_PrintTraceBack |
| 332 | #define restore_thread PyEval_RestoreThread |
| 333 | #define save_thread PyEval_SaveThread |
| 334 | #define tb_fetch PyTraceBack_Fetch |
| 335 | #define tb_here PyTraceBack_Here |
| 336 | #define tb_print PyTraceBack_Print |
| 337 | #define tb_store PyTraceBack_Store |
| 338 | #define add_module PyImport_AddModule |
| 339 | #define doneimport PyImport_Cleanup |
| 340 | #define get_modules PyImport_GetModuleDict |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 341 | #define get_pyc_magic PyImport_GetMagicNumber |
Jack Jansen | 3cfc8bd | 1995-02-15 22:55:45 +0000 | [diff] [blame] | 342 | #define exec_code_module PyImport_ExecCodeModule |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 343 | #define import_module PyImport_ImportModule |
| 344 | #define init_frozen PyImport_ImportFrozenModule |
| 345 | #define initimport PyImport_Init |
| 346 | #define reload_module PyImport_ReloadModule |
Guido van Rossum | 04527a2 | 1996-06-17 17:05:38 +0000 | [diff] [blame] | 347 | #define frozen_modules PyImport_FrozenModules |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 348 | #define coerce PyNumber_Coerce |
| 349 | #define getbuiltin PyBuiltin_GetObject |
| 350 | #define initbuiltin PyBuiltin_Init |
Guido van Rossum | 0578851 | 1996-05-22 16:30:09 +0000 | [diff] [blame] | 351 | #define getbuiltindict PyBuiltin_GetDict |
| 352 | #define getbuiltinmod PyBuiltin_GetModule |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 353 | #define initmarshal PyMarshal_Init |
| 354 | #define initmodule Py_InitModule |
| 355 | #define initmodule4 Py_InitModule4 |
| 356 | #define rd_long PyMarshal_ReadLongFromFile |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 357 | #define rd_short PyMarshal_ReadShortFromFile |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 358 | #define rd_object PyMarshal_ReadObjectFromFile |
| 359 | #define rds_object PyMarshal_ReadObjectFromString |
| 360 | #define wr_long PyMarshal_WriteLongToFile |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 361 | #define wr_short PyMarshal_WriteShortToFile |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 362 | #define wr_object PyMarshal_WriteObjectToFile |
| 363 | #define initsys PySys_Init |
| 364 | #define setpythonargv PySys_SetArgv |
| 365 | #define setpythonpath PySys_SetPath |
| 366 | #define sysget PySys_GetObject |
| 367 | #define sysgetfile PySys_GetFile |
| 368 | #define sysset PySys_SetObject |
| 369 | #define compile_string Py_CompileString |
| 370 | #define fatal Py_FatalError |
| 371 | #define goaway Py_Exit |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 372 | #define cleanup Py_Cleanup |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 373 | #define initall Py_Initialize |
| 374 | #define print_error PyErr_Print |
| 375 | #define parse_file PyParser_SimpleParseFile |
| 376 | #define parse_string PyParser_SimpleParseString |
| 377 | #define run PyRun_AnyFile |
| 378 | #define run_script PyRun_SimpleFile |
| 379 | #define run_command PyRun_SimpleString |
| 380 | #define run_file PyRun_File |
| 381 | #define run_string PyRun_String |
| 382 | #define run_tty_1 PyRun_InteractiveOne |
| 383 | #define run_tty_loop PyRun_InteractiveLoop |
| 384 | #define getmember PyMember_Get |
| 385 | #define setmember PyMember_Set |
| 386 | #define mkvalue Py_BuildValue |
| 387 | #define vmkvalue Py_VaBuildValue |
| 388 | #define getargs PyArg_Parse |
Guido van Rossum | 63c35e5 | 1997-04-29 16:21:39 +0000 | [diff] [blame] | 389 | #define vgetargs PyArg_VaParse |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 390 | #define newgetargs PyArg_ParseTuple |
Guido van Rossum | 63c35e5 | 1997-04-29 16:21:39 +0000 | [diff] [blame] | 391 | #define getnoarg(v) PyArg_Parse((v), "") |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 392 | #define getintarg(v,a) getargs((v),"i",(a)) |
| 393 | #define getlongarg(v,a) getargs((v),"l",(a)) |
| 394 | #define getstrarg(v,a) getargs((v),"s",(a)) |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 395 | #define err_badarg PyErr_BadArgument |
| 396 | #define err_badcall PyErr_BadInternalCall |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 397 | #define err_nomem PyErr_NoMemory |
| 398 | #define err_errno PyErr_SetFromErrno |
| 399 | #define err_set PyErr_SetNone |
| 400 | #define err_setstr PyErr_SetString |
| 401 | #define err_setval PyErr_SetObject |
| 402 | #define err_occurred PyErr_Occurred |
| 403 | #define err_fetch PyErr_Fetch |
| 404 | #define err_restore PyErr_Restore |
| 405 | #define err_clear PyErr_Clear |
| 406 | #define fgets_intr PyOS_InterruptableGetString |
| 407 | #define initintr PyOS_InitInterrupts |
| 408 | #define intrcheck PyOS_InterruptOccurred |
| 409 | #define getmtime PyOS_GetLastModificationTime |
Guido van Rossum | 9381782 | 1995-01-17 16:01:01 +0000 | [diff] [blame] | 410 | #define my_readline PyOS_Readline |
| 411 | #define realmain Py_Main |
| 412 | #define ref_total _Py_RefTotal |
| 413 | #define sigcheck PyErr_CheckSignals |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 414 | |
Guido van Rossum | 5f1563c | 1996-05-24 21:11:58 +0000 | [diff] [blame] | 415 | /* Misc. stuff */ |
| 416 | #define getcompiler Py_GetCompiler |
| 417 | #define getcopyright Py_GetCopyright |
| 418 | #define getplatform Py_GetPlatform |
| 419 | #define getversion Py_GetVersion |
Guido van Rossum | 9a97d6c | 1996-05-28 22:27:07 +0000 | [diff] [blame] | 420 | #define getpythonpath Py_GetPath |
Guido van Rossum | bb86406 | 1996-07-21 02:23:24 +0000 | [diff] [blame] | 421 | #define getprogramname Py_GetProgramName |
| 422 | #define getargcargv Py_GetArgcArgv |
Guido van Rossum | 5f1563c | 1996-05-24 21:11:58 +0000 | [diff] [blame] | 423 | |
| 424 | /* Misc. Internals */ |
| 425 | #define askyesno _Py_AskYesNo |
Guido van Rossum | 5f1563c | 1996-05-24 21:11:58 +0000 | [diff] [blame] | 426 | #define import_filetab _PyImport_Filetab |
| 427 | #define import_maxsuffixsize _PyImport_MaxSuffixSize |
| 428 | #define load_dynamic_module _PyImport_LoadDynamicModule |
Guido van Rossum | e601c0f | 1997-04-29 16:23:44 +0000 | [diff] [blame] | 429 | #define inittab _PyImport_Inittab |
Guido van Rossum | 5f1563c | 1996-05-24 21:11:58 +0000 | [diff] [blame] | 430 | |
Guido van Rossum | caa6380 | 1995-01-12 11:45:45 +0000 | [diff] [blame] | 431 | #ifdef __cplusplus |
| 432 | } |
| 433 | #endif |
| 434 | #endif /* !Py_OLDNAMES_H */ |