| Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 1 | #ifndef Py_RENAME1_H | 
 | 2 | #define Py_RENAME1_H | 
 | 3 | #ifdef __cplusplus | 
 | 4 | extern "C" { | 
 | 5 | #endif | 
 | 6 |  | 
 | 7 | /*********************************************************** | 
 | 8 | Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum, | 
 | 9 | Amsterdam, 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 |    "new style" names (e.g. PyObject) with the old style Python source | 
 | 33 |    distribution. */ | 
 | 34 |  | 
 | 35 | typedef ANY *PyUnivPtr; | 
 | 36 |  | 
 | 37 | #define Py_NO_DEBUG NDEBUG | 
 | 38 | #define Py_TRACE_REFS TRACE_REFS | 
 | 39 | #define Py_REF_DEBUG REF_DEBUG | 
 | 40 | #define Py_HAVE_PROTOTYPES HAVE_PROTOTYPES | 
 | 41 | #define Py_HAVE_STDLIB HAVE_STDLIB | 
 | 42 | #define _Py_ZeroStruct FalseObject | 
 | 43 | #define _Py_NoneStruct NoObject | 
 | 44 | #define _Py_TrueStruct TrueObject | 
 | 45 | #define Py_DebugFlag debugging | 
 | 46 | #define _PyParser_Grammar gram | 
 | 47 | #define _PySys_ProfileFunc sys_profile | 
 | 48 | #define _PySys_TraceFunc sys_trace | 
 | 49 | #define _PyThread_Started threads_started | 
 | 50 | #define _PyParser_TokenNames tok_name | 
 | 51 | #define Py_VerboseFlag verbose | 
 | 52 | #define PyExc_AttributeError AttributeError | 
 | 53 | #define PyExc_EOFError EOFError | 
 | 54 | #define PyExc_IOError IOError | 
 | 55 | #define PyExc_ImportError ImportError | 
 | 56 | #define PyExc_IndexError IndexError | 
 | 57 | #define PyExc_KeyError KeyError | 
 | 58 | #define PyExc_MemoryError MemoryError | 
 | 59 | #define PyExc_NameError NameError | 
 | 60 | #define PyExc_OverflowError OverflowError | 
 | 61 | #define PyExc_RuntimeError RuntimeError | 
 | 62 | #define PyExc_SyntaxError SyntaxError | 
 | 63 | #define PyExc_SystemError SystemError | 
 | 64 | #define PyExc_TypeError TypeError | 
 | 65 | #define PyExc_ValueError ValueError | 
 | 66 | #define PyExc_ZeroDivisionError ZeroDivisionError | 
 | 67 | #define PyExc_KeyboardInterrupt KeyboardInterrupt | 
 | 68 | #define PyExc_SystemExit SystemExit | 
 | 69 | #define PyFloat_Type Floattype | 
 | 70 | #define PyInt_Type Inttype | 
 | 71 | #define PyLong_Type Longtype | 
 | 72 | #define PyNothing_Type Notype | 
 | 73 | #define PyString_Type Stringtype | 
 | 74 | #define PyType_Type Typetype | 
 | 75 | #define PyList_Type Listtype | 
 | 76 | #define PyDict_Type Dicttype | 
 | 77 | #define PyTuple_Type Tupletype | 
 | 78 | #define PyFile_Type Filetype | 
 | 79 | #define PyClass_Type Classtype | 
 | 80 | #define PyFunction_Type Functype | 
 | 81 | #define PyMethod_Type Instancemethodtype | 
 | 82 | #define PyInstance_Type Instancetype | 
 | 83 | #define PyCFunction_Type Methodtype | 
 | 84 | #define PyModule_Type Moduletype | 
 | 85 | #define PyCode_Type Codetype | 
 | 86 | #define PyFrame_Type Frametype | 
 | 87 | #define PyFloatObject floatobject | 
 | 88 | #define PyIntObject intobject | 
 | 89 | #define PyLongObject longobject | 
 | 90 | #define PyNothingObject noobject | 
 | 91 | #define PyStringObject stringobject | 
 | 92 | #define PyTypeObject typeobject | 
 | 93 | #define PyListObject listobject | 
 | 94 | #define PyDictObject dictobject | 
 | 95 | #define PyTupleObject tupleobject | 
 | 96 | #define PyFileObject fileobject | 
 | 97 | #define PyClassObject classobject | 
 | 98 | #define PyCodeObject codeobject | 
 | 99 | #define PyFrameObject frameobject | 
 | 100 | #define PyFunctionObject funcobject | 
 | 101 | #define PyMethodObject instancemethodobject | 
 | 102 | #define PyInstanceObject instanceobject | 
 | 103 | #define PyCFunctionObject methodobject | 
 | 104 | #define PyModuleObject moduleobject | 
 | 105 | #define PyNumberMethods number_methods | 
 | 106 | #define PySequenceMethods sequence_methods | 
 | 107 | #define PyMappingMethods mapping_methods | 
 | 108 | #define PyObject_HEAD OB_HEAD | 
 | 109 | #define PyObject_VAR_HEAD OB_VARHEAD | 
 | 110 | #define PyObject_HEAD_INIT OB_HEAD_INIT | 
 | 111 | #define PyObject_NEW NEWOBJ | 
 | 112 | #define PyObject_NEW_VAR NEWVAROBJ | 
 | 113 | #define Py_PROTO PROTO | 
 | 114 | #define Py_FPROTO PROTO | 
 | 115 | #define PyMem_NEW NEW | 
 | 116 | #define PyMem_RESIZE RESIZE | 
 | 117 | #define PyMem_DEL DEL | 
 | 118 | #define PyMem_XDEL XDEL | 
 | 119 | #define Py_BEGIN_ALLOW_THREADS BGN_SAVE | 
 | 120 | #define Py_BLOCK_THREADS RET_SAVE | 
 | 121 | #define Py_UNBLOCK_THREADS RES_SAVE | 
 | 122 | #define Py_END_ALLOW_THREADS END_SAVE | 
 | 123 | #define PyFloat_Check is_floatobject | 
 | 124 | #define PyInt_Check is_intobject | 
 | 125 | #define PyLong_Check is_longobject | 
 | 126 | #define PyNothing_Check is_noobject | 
 | 127 | #define PyString_Check is_stringobject | 
 | 128 | #define PyType_Check is_typeobject | 
 | 129 | #define PyList_Check is_listobject | 
 | 130 | #define PyDict_Check is_dictobject | 
 | 131 | #define PyTuple_Check is_tupleobject | 
 | 132 | #define PyFile_Check is_fileobject | 
 | 133 | #define PyClass_Check is_classobject | 
 | 134 | #define PyCode_Check is_codeobject | 
 | 135 | #define PyFrame_Check is_frameobject | 
 | 136 | #define PyFunction_Check is_funcobject | 
 | 137 | #define PyMethod_Check is_instancemethodobject | 
 | 138 | #define PyInstance_Check is_instanceobject | 
 | 139 | #define PyCFunction_Check is_methodobject | 
 | 140 | #define PyModule_Check is_moduleobject | 
 | 141 | #define Py_INCREF INCREF | 
 | 142 | #define Py_DECREF DECREF | 
 | 143 | #define Py_XINCREF XINCREF | 
 | 144 | #define Py_XDECREF XDECREF | 
 | 145 | #define _Py_NewReference NEWREF | 
 | 146 | #define _Py_Dealloc DELREF | 
 | 147 | #define _Py_ForgetReference UNREF | 
 | 148 | #define Py_None None | 
 | 149 | #define Py_False False | 
 | 150 | #define Py_True True | 
 | 151 | #define PyObject_Compare cmpobject | 
 | 152 | #define PyObject_GetAttrString getattr | 
 | 153 | #define PyObject_GetAttr getattro | 
 | 154 | #define PyObject_Hash hashobject | 
 | 155 | #define _PyObject_New newobject | 
 | 156 | #define _PyObject_NewVar newvarobject | 
 | 157 | #define PyObject_Print printobject | 
 | 158 | #define PyObject_Repr reprobject | 
 | 159 | #define PyObject_SetAttrString setattr | 
 | 160 | #define PyObject_SetAttr setattro | 
 | 161 | #define PyObject_IsTrue testbool | 
 | 162 | #define Py_PRINT_RAW PRINT_RAW | 
 | 163 | #define PyFloat_AsString float_buf_repr | 
 | 164 | #define PyFloat_AsDouble getfloatvalue | 
 | 165 | #define PyFloat_AS_DOUBLE GETFLOATVALUE | 
 | 166 | #define PyFloat_FromDouble newfloatobject | 
 | 167 | #define PyInt_AsLong getintvalue | 
 | 168 | #define PyInt_AS_LONG GETINTVALUE | 
 | 169 | #define PyInt_FromLong newintobject | 
 | 170 | #define _PyLong_New alloclongobject | 
 | 171 | #define PyLong_AsDouble dgetlongvalue | 
 | 172 | #define PyLong_FromDouble dnewlongobject | 
 | 173 | #define PyLong_AsLong getlongvalue | 
 | 174 | #define PyLong_FromString long_scan | 
 | 175 | #define PyLong_FromLong newlongobject | 
 | 176 | #define PyString_Format formatstring | 
 | 177 | #define PyString_Size getstringsize | 
 | 178 | #define PyString_AsString getstringvalue | 
 | 179 | #define PyString_AS_STRING GETSTRINGVALUE | 
 | 180 | #define PyString_Concat joinstring | 
 | 181 | #define PyString_FromStringAndSize newsizedstringobject | 
 | 182 | #define PyString_FromString newstringobject | 
 | 183 | #define _PyString_Resize resizestring | 
 | 184 | #define PyList_Append addlistitem | 
 | 185 | #define PyList_GetItem getlistitem | 
 | 186 | #define PyList_GET_ITEM GETLISTITEM | 
 | 187 | #define PyList_Size getlistsize | 
 | 188 | #define PyList_GetSlice getlistslice | 
 | 189 | #define PyList_Insert inslistitem | 
 | 190 | #define PyList_New newlistobject | 
 | 191 | #define PyList_SetItem setlistitem | 
 | 192 | #define PyList_SetSlice setlistslice | 
 | 193 | #define PyList_Sort sortlist | 
 | 194 | #define PyDict_SetItemString dictinsert | 
 | 195 | #define PyDict_GetItemString dictlookup | 
 | 196 | #define PyDict_DelItemString dictremove | 
 | 197 | #define PyDict_Items getmappingitems | 
 | 198 | #define PyDict_Keys getmappingkeys | 
 | 199 | #define PyDict_Values getmappingvalues | 
 | 200 | #define PyDict_Clear mappingclear | 
 | 201 | #define PyDict_Next mappinggetnext | 
 | 202 | #define PyDict_SetItem mappinginsert | 
 | 203 | #define PyDict_GetItem mappinglookup | 
 | 204 | #define PyDict_DelItem mappingremove | 
 | 205 | #define PyDict_New newmappingobject | 
 | 206 | #define PyTuple_GetItem gettupleitem | 
 | 207 | #define PyTuple_GET_ITEM GETTUPLEITEM | 
 | 208 | #define PyTuple_Size gettuplesize | 
 | 209 | #define PyTuple_GetSlice gettupleslice | 
 | 210 | #define PyTuple_New newtupleobject | 
 | 211 | #define PyTuple_SetItem settupleitem | 
 | 212 | #define PyFile_GetLine filegetline | 
 | 213 | #define PyFile_AsFile getfilefile | 
 | 214 | #define PyFile_FromString newfileobject | 
 | 215 | #define PyFile_FromFile newopenfileobject | 
 | 216 | #define PyFile_SoftSpace softspace | 
 | 217 | #define PyFile_WriteObject writeobject | 
 | 218 | #define PyFile_WriteString writestring | 
 | 219 | #define PyMethod_Class instancemethodgetclass | 
 | 220 | #define PyMethod_Function instancemethodgetfunc | 
 | 221 | #define PyMethod_Self instancemethodgetself | 
 | 222 | #define PyClass_IsSubclass issubclass | 
 | 223 | #define PyClass_New newclassobject | 
 | 224 | #define PyMethod_New newinstancemethodobject | 
 | 225 | #define PyInstance_New newinstanceobject | 
 | 226 | #define PyTryBlock block | 
 | 227 | #define PyFrame_ExtendStack extend_stack | 
 | 228 | #define PyFrame_New newframeobject | 
 | 229 | #define PyFrame_BlockPop pop_block | 
 | 230 | #define PyFrame_BlockSetup setup_block | 
 | 231 | #define PyFunction_GetCode getfunccode | 
 | 232 | #define PyFunction_GetGlobals getfuncglobals | 
 | 233 | #define PyFunction_New newfuncobject | 
 | 234 | #define PyCFunction method | 
 | 235 | #define Py_FindMethod findmethod | 
 | 236 | #define PyCFunction_GetFunction getmethod | 
 | 237 | #define PyCFunction_GetSelf getself | 
 | 238 | #define PyCFunction_IsVarArgs getvarargs | 
 | 239 | #define PyCFunction_New newmethodobject | 
 | 240 | #define PyModule_GetDict getmoduledict | 
 | 241 | #define PyModule_GetName getmodulename | 
 | 242 | #define PyModule_New newmoduleobject | 
 | 243 | #define PyGrammar_AddAccelerators addaccelerators | 
 | 244 | #define PyGrammar_FindDFA finddfa | 
 | 245 | #define PyGrammar_LabelRepr labelrepr | 
 | 246 | #define PyNode_ListTree listtree | 
 | 247 | #define PyNode_AddChild addchild | 
 | 248 | #define PyNode_Free freetree | 
 | 249 | #define PyNode_New newtree | 
 | 250 | #define PyParser_AddToken addtoken | 
 | 251 | #define PyParser_Delete delparser | 
 | 252 | #define PyParser_New newparser | 
 | 253 | #define PyParser_ParseFile parsefile | 
 | 254 | #define PyParser_ParseString parsestring | 
 | 255 | #define PyToken_OneChar tok_1char | 
 | 256 | #define PyToken_TwoChars tok_2char | 
 | 257 | #define PyTokenizer_Free tok_free | 
 | 258 | #define PyTokenizer_Get tok_get | 
 | 259 | #define PyTokenizer_FromFile tok_setupf | 
 | 260 | #define PyTokenizer_FromString tok_setups | 
 | 261 | #define PyNode_Compile compile | 
 | 262 | #define PyCode_New newcodeobject | 
 | 263 | #define PyEval_CallObject call_object | 
 | 264 | #define PyEval_EvalCode eval_code | 
 | 265 | #define Py_FlushLine flushline | 
 | 266 | #define PyEval_GetGlobals getglobals | 
 | 267 | #define PyEval_GetLocals getlocals | 
 | 268 | #define PyEval_InitThreads init_save_thread | 
 | 269 | #define PyErr_PrintTraceBack printtraceback | 
 | 270 | #define PyEval_RestoreThread restore_thread | 
 | 271 | #define PyEval_SaveThread save_thread | 
 | 272 | #define PyTraceBack_Fetch tb_fetch | 
 | 273 | #define PyTraceBack_Here tb_here | 
 | 274 | #define PyTraceBack_Print tb_print | 
 | 275 | #define PyTraceBack_Store tb_store | 
 | 276 | #define PyImport_AddModule add_module | 
 | 277 | #define PyImport_Cleanup doneimport | 
 | 278 | #define PyImport_GetModuleDict get_modules | 
 | 279 | #define PyImport_ImportModule import_module | 
 | 280 | #define PyImport_ImportFrozenModule init_frozen | 
 | 281 | #define PyImport_Init initimport | 
 | 282 | #define PyImport_ReloadModule reload_module | 
 | 283 | #define PyNumber_Coerce coerce | 
 | 284 | #define PyBuiltin_GetObject getbuiltin | 
 | 285 | #define PyBuiltin_Init initbuiltin | 
 | 286 | #define PyMarshal_Init initmarshal | 
 | 287 | #define PyMarshal_ReadLongFromFile rd_long | 
 | 288 | #define PyMarshal_ReadObjectFromFile rd_object | 
 | 289 | #define PyMarshal_ReadObjectFromString rds_object | 
 | 290 | #define PyMarshal_WriteLongToFile wr_long | 
 | 291 | #define PyMarshal_WriteObjectToFile wr_object | 
 | 292 | #define PySys_Init initsys | 
 | 293 | #define PySys_SetArgv setpythonargv | 
 | 294 | #define PySys_SetPath setpythonpath | 
 | 295 | #define PySys_GetObject sysget | 
 | 296 | #define PySys_GetFile sysgetfile | 
 | 297 | #define PySys_SetObject sysset | 
 | 298 | #define Py_CompileString compile_string | 
 | 299 | #define Py_FatalError fatal | 
 | 300 | #define Py_Exit goaway | 
 | 301 | #define Py_Initialize initall | 
 | 302 | #define PyErr_Print print_error | 
 | 303 | #define PyParser_SimpleParseFile parse_file | 
 | 304 | #define PyParser_SimpleParseString parse_string | 
 | 305 | #define PyRun_AnyFile run | 
 | 306 | #define PyRun_SimpleFile run_script | 
 | 307 | #define PyRun_SimpleString run_command | 
 | 308 | #define PyRun_File run_file | 
 | 309 | #define PyRun_String run_string | 
 | 310 | #define PyRun_InteractiveOne run_tty_1 | 
 | 311 | #define PyRun_InteractiveLoop run_tty_loop | 
 | 312 | #define PyMember_Get getmember | 
 | 313 | #define PyMember_Set setmember | 
 | 314 | #define Py_InitModule initmodule | 
 | 315 | #define Py_BuildValue mkvalue | 
 | 316 | #define Py_VaBuildValue vmkvalue | 
 | 317 | #define PyArg_Parse getargs | 
 | 318 | #define PyArg_GetChar getichararg | 
 | 319 | #define PyArg_GetDoubleArray getidoublearray | 
 | 320 | #define PyArg_GetFloat getifloatarg | 
 | 321 | #define PyArg_GetFloatArray getifloatarray | 
 | 322 | #define PyArg_GetLong getilongarg | 
 | 323 | #define PyArg_GetLongArray getilongarray | 
 | 324 | #define PyArg_GetLongArraySize getilongarraysize | 
 | 325 | #define PyArg_GetObject getiobjectarg | 
 | 326 | #define PyArg_GetShort getishortarg | 
 | 327 | #define PyArg_GetShortArray getishortarray | 
 | 328 | #define PyArg_GetShortArraySize getishortarraysize | 
 | 329 | #define PyArg_GetString getistringarg | 
 | 330 | #define PyErr_BadArgument err_badarg | 
 | 331 | #define PyErr_BadInternalCall err_badcall | 
 | 332 | #define PyErr_Input err_input | 
 | 333 | #define PyErr_NoMemory err_nomem | 
 | 334 | #define PyErr_SetFromErrno err_errno | 
 | 335 | #define PyErr_SetNone err_set | 
 | 336 | #define PyErr_SetString err_setstr | 
 | 337 | #define PyErr_SetObject err_setval | 
 | 338 | #define PyErr_Occurred err_occurred | 
 | 339 | #define PyErr_GetAndClear err_get | 
 | 340 | #define PyErr_Clear err_clear | 
 | 341 | #define PyOS_InterruptableGetString fgets_intr | 
 | 342 | #define PyOS_InitInterrupts initintr | 
 | 343 | #define PyOS_InterruptOccurred intrcheck | 
 | 344 | #define PyOS_GetLastModificationTime getmtime | 
 | 345 |  | 
 | 346 | #ifdef __cplusplus | 
 | 347 | } | 
 | 348 | #endif | 
 | 349 | #endif /* !Py_RENAME1_H */ |