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