Kaydet (Commit) 93817828 authored tarafından Guido van Rossum's avatar Guido van Rossum

new names for lots of new functions

üst 8e8a525f
...@@ -46,19 +46,19 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -46,19 +46,19 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define AC_R_PUBLIC 0004 #define AC_R_PUBLIC 0004
#define AC_W_PUBLIC 0002 #define AC_W_PUBLIC 0002
extern DL_IMPORT PyTypeObject Accesstype; extern DL_IMPORT PyTypeObject PyAccess_Type;
#define PyAccess_Check(v) ((v)->ob_type == &Accesstype) #define PyAccess_Check(v) ((v)->ob_type == &PyAccess_Type)
PyObject *newaccessobject Py_PROTO((PyObject *, PyObject *, PyTypeObject *, int)); PyObject *PyAccess_FromValue Py_PROTO((PyObject *, PyObject *, PyTypeObject *, int));
PyObject *getaccessvalue Py_PROTO((PyObject *, PyObject *)); PyObject *PyAccess_AsValue Py_PROTO((PyObject *, PyObject *));
int setaccessvalue Py_PROTO((PyObject *, PyObject *, PyObject *)); int PyAccess_SetValue Py_PROTO((PyObject *, PyObject *, PyObject *));
void setaccessowner Py_PROTO((PyObject *, PyObject *)); void PyAccess_SetOwner Py_PROTO((PyObject *, PyObject *));
PyObject *cloneaccessobject Py_PROTO((PyObject *)); PyObject *PyAccess_Clone Py_PROTO((PyObject *));
int hasaccessvalue Py_PROTO((PyObject *)); int PyAccess_HasValue Py_PROTO((PyObject *));
extern DL_IMPORT PyTypeObject Anynumbertype, Anysequencetype, Anymappingtype; extern DL_IMPORT PyTypeObject PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type;
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -64,7 +64,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -64,7 +64,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "stringobject.h" #include "stringobject.h"
#include "tupleobject.h" #include "tupleobject.h"
#include "listobject.h" #include "listobject.h"
#include "dictobject.h" #include "mappingobject.h"
#include "methodobject.h" #include "methodobject.h"
#include "moduleobject.h" #include "moduleobject.h"
#include "funcobject.h" #include "funcobject.h"
......
...@@ -31,6 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -31,6 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Built-in module interface */ /* Built-in module interface */
extern PyObject *getbuiltindict Py_PROTO(()); extern PyObject *getbuiltindict Py_PROTO(());
extern PyObject *getbuiltinmod Py_PROTO(());
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -32,20 +32,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -32,20 +32,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "mappingobject.h" #include "mappingobject.h"
#define PyDict_Check(op) is_mappingobject(op)
#define newdictobject PyDict_New
extern PyObject *PyDict_GetItemString Py_PROTO((PyObject *dp, char *key));
extern int PyDict_SetItemString Py_PROTO((PyObject *dp, char *key, PyObject *item));
extern int PyDict_DelItemString Py_PROTO((PyObject *dp, char *key));
#define getdictkeys PyDict_Keys
#define dict2lookup PyDict_GetItem
#define dict2insert PyDict_SetItem
#define dict2remove PyDict_DelItem
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -68,7 +68,7 @@ extern PyObject *PyErr_SetFromErrno Py_PROTO((PyObject *)); ...@@ -68,7 +68,7 @@ extern PyObject *PyErr_SetFromErrno Py_PROTO((PyObject *));
extern void PyErr_BadInternalCall Py_PROTO((void)); extern void PyErr_BadInternalCall Py_PROTO((void));
extern int sigcheck Py_PROTO((void)); /* In sigcheck.c or signalmodule.c */ extern int PyErr_CheckSignals Py_PROTO((void)); /* In sigcheck.c or signalmodule.c */
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -35,11 +35,11 @@ extern DL_IMPORT PyTypeObject PyFile_Type; ...@@ -35,11 +35,11 @@ extern DL_IMPORT PyTypeObject PyFile_Type;
#define PyFile_Check(op) ((op)->ob_type == &PyFile_Type) #define PyFile_Check(op) ((op)->ob_type == &PyFile_Type)
extern PyObject *PyFile_FromString Py_PROTO((char *, char *)); extern PyObject *PyFile_FromString Py_PROTO((char *, char *));
extern void setfilebufsize Py_PROTO((PyObject *, int)); extern void PyFile_SetBufSize Py_PROTO((PyObject *, int));
extern PyObject *PyFile_FromFile extern PyObject *PyFile_FromFile
Py_PROTO((FILE *, char *, char *, int (*)Py_FPROTO((FILE *)))); Py_PROTO((FILE *, char *, char *, int (*)Py_FPROTO((FILE *))));
extern FILE *PyFile_AsFile Py_PROTO((PyObject *)); extern FILE *PyFile_AsFile Py_PROTO((PyObject *));
extern PyObject *getfilename Py_PROTO((PyObject *)); extern PyObject *PyFile_Name Py_PROTO((PyObject *));
extern PyObject *PyFile_GetLine Py_PROTO((PyObject *, int)); extern PyObject *PyFile_GetLine Py_PROTO((PyObject *, int));
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -72,7 +72,7 @@ PyFrameObject * PyFrame_New ...@@ -72,7 +72,7 @@ PyFrameObject * PyFrame_New
/* The rest of the interface is specific for frame objects */ /* The rest of the interface is specific for frame objects */
/* List access macros */ /* Tuple access macros */
#ifdef NDEBUG #ifdef NDEBUG
#define GETITEM(v, i) PyTuple_GET_ITEM((PyTupleObject *)(v), (i)) #define GETITEM(v, i) PyTuple_GET_ITEM((PyTupleObject *)(v), (i))
...@@ -103,8 +103,8 @@ PyObject **PyFrame_ExtendStack Py_PROTO((PyFrameObject *, int, int)); ...@@ -103,8 +103,8 @@ PyObject **PyFrame_ExtendStack Py_PROTO((PyFrameObject *, int, int));
/* Conversions between "fast locals" and locals in dictionary */ /* Conversions between "fast locals" and locals in dictionary */
void locals_2_fast Py_PROTO((PyFrameObject *, int)); void PyFrame_LocalsToFast Py_PROTO((PyFrameObject *, int));
void fast_2_locals Py_PROTO((PyFrameObject *)); void PyFrame_FastToLocals Py_PROTO((PyFrameObject *));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -47,8 +47,8 @@ extern DL_IMPORT PyTypeObject PyFunction_Type; ...@@ -47,8 +47,8 @@ extern DL_IMPORT PyTypeObject PyFunction_Type;
extern PyObject *PyFunction_New Py_PROTO((PyObject *, PyObject *)); extern PyObject *PyFunction_New Py_PROTO((PyObject *, PyObject *));
extern PyObject *PyFunction_GetCode Py_PROTO((PyObject *)); extern PyObject *PyFunction_GetCode Py_PROTO((PyObject *));
extern PyObject *PyFunction_GetGlobals Py_PROTO((PyObject *)); extern PyObject *PyFunction_GetGlobals Py_PROTO((PyObject *));
extern PyObject *getfuncargstuff Py_PROTO((PyObject *, int *)); extern PyObject *PyFunction_GetArgStuff Py_PROTO((PyObject *, int *));
extern int setfuncargstuff Py_PROTO((PyObject *, int, PyObject *)); extern int PyFunction_SetArgStuff Py_PROTO((PyObject *, int, PyObject *));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -62,6 +62,7 @@ extern int PyList_Append Py_PROTO((PyObject *, PyObject *)); ...@@ -62,6 +62,7 @@ extern int PyList_Append Py_PROTO((PyObject *, PyObject *));
extern PyObject *PyList_GetSlice Py_PROTO((PyObject *, int, int)); extern PyObject *PyList_GetSlice Py_PROTO((PyObject *, int, int));
extern int PyList_SetSlice Py_PROTO((PyObject *, int, int, PyObject *)); extern int PyList_SetSlice Py_PROTO((PyObject *, int, int, PyObject *));
extern int PyList_Sort Py_PROTO((PyObject *)); extern int PyList_Sort Py_PROTO((PyObject *));
extern int PyList_Reverse Py_PROTO((PyObject *));
extern PyObject *listtuple Py_PROTO((PyObject *)); extern PyObject *listtuple Py_PROTO((PyObject *));
/* Macro, trading safety for speed */ /* Macro, trading safety for speed */
......
...@@ -41,8 +41,7 @@ extern PyObject *PyLong_FromDouble Py_PROTO((double)); ...@@ -41,8 +41,7 @@ extern PyObject *PyLong_FromDouble Py_PROTO((double));
extern long PyLong_AsLong Py_PROTO((PyObject *)); extern long PyLong_AsLong Py_PROTO((PyObject *));
extern double PyLong_AsDouble Py_PROTO((PyObject *)); extern double PyLong_AsDouble Py_PROTO((PyObject *));
PyObject *PyLong_FromString Py_PROTO((char *, int)); PyObject *PyLong_FromString Py_PROTO((char *, char **, int));
PyObject *long_escan Py_PROTO((char *, char **, int));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -28,11 +28,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -28,11 +28,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/ ******************************************************************/
/* Mapping object type -- mapping from hashable object to object */ /* Dictionary object type -- mapping from hashable object to object */
/* NB Should be moved back to dictobject.h */
extern DL_IMPORT PyTypeObject Mappingtype; extern DL_IMPORT PyTypeObject PyDict_Type;
#define is_mappingobject(op) ((op)->ob_type == &Mappingtype) #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type)
extern PyObject *PyDict_New Py_PROTO((void)); extern PyObject *PyDict_New Py_PROTO((void));
extern PyObject *PyDict_GetItem Py_PROTO((PyObject *mp, PyObject *key)); extern PyObject *PyDict_GetItem Py_PROTO((PyObject *mp, PyObject *key));
...@@ -44,7 +45,11 @@ extern int PyDict_Next ...@@ -44,7 +45,11 @@ extern int PyDict_Next
extern PyObject *PyDict_Keys Py_PROTO((PyObject *mp)); extern PyObject *PyDict_Keys Py_PROTO((PyObject *mp));
extern PyObject *PyDict_Values Py_PROTO((PyObject *mp)); extern PyObject *PyDict_Values Py_PROTO((PyObject *mp));
extern PyObject *PyDict_Items Py_PROTO((PyObject *mp)); extern PyObject *PyDict_Items Py_PROTO((PyObject *mp));
extern int getmappingsize Py_PROTO((PyObject *mp)); extern int PyDict_Size Py_PROTO((PyObject *mp));
extern PyObject *PyDict_GetItemString Py_PROTO((PyObject *dp, char *key));
extern int PyDict_SetItemString Py_PROTO((PyObject *dp, char *key, PyObject *item));
extern int PyDict_DelItemString Py_PROTO((PyObject *dp, char *key));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -31,11 +31,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -31,11 +31,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Interface for marshal.c */ /* Interface for marshal.c */
void PyMarshal_WriteLongToFile Py_PROTO((long, FILE *)); void PyMarshal_WriteLongToFile Py_PROTO((long, FILE *));
void wr_short Py_PROTO((int, FILE *)); void PyMarshal_WriteShortToFile Py_PROTO((int, FILE *));
void PyMarshal_WriteObjectToFile Py_PROTO((PyObject *, FILE *)); void PyMarshal_WriteObjectToFile Py_PROTO((PyObject *, FILE *));
long PyMarshal_ReadLongFromFile Py_PROTO((FILE *)); long PyMarshal_ReadLongFromFile Py_PROTO((FILE *));
int rd_short Py_PROTO((FILE *)); int PyMarshal_ReadShortFromFile Py_PROTO((FILE *));
PyObject *PyMarshal_ReadObjectFromFile Py_PROTO((FILE *)); PyObject *PyMarshal_ReadObjectFromFile Py_PROTO((FILE *));
PyObject *PyMarshal_ReadObjectFromString Py_PROTO((char *, int)); PyObject *PyMarshal_ReadObjectFromString Py_PROTO((char *, int));
......
...@@ -244,10 +244,10 @@ extern DL_IMPORT PyTypeObject PyType_Type; /* The type of type objects */ ...@@ -244,10 +244,10 @@ extern DL_IMPORT PyTypeObject PyType_Type; /* The type of type objects */
/* Generic operations on objects */ /* Generic operations on objects */
extern int PyObject_Print Py_PROTO((PyObject *, FILE *, int)); extern int PyObject_Print Py_PROTO((PyObject *, FILE *, int));
extern PyObject * PyObject_Repr Py_PROTO((PyObject *)); extern PyObject * PyObject_Repr Py_PROTO((PyObject *));
extern PyObject * strobject Py_PROTO((PyObject *)); extern PyObject * PyObject_Str Py_PROTO((PyObject *));
extern int PyObject_Compare Py_PROTO((PyObject *, PyObject *)); extern int PyObject_Compare Py_PROTO((PyObject *, PyObject *));
extern PyObject *PyObject_GetAttrString Py_PROTO((PyObject *, char *)); extern PyObject *PyObject_GetAttrString Py_PROTO((PyObject *, char *));
extern int hasattr Py_PROTO((PyObject *, char *)); extern int PyObject_HasAttrString Py_PROTO((PyObject *, char *));
extern PyObject *PyObject_GetAttr Py_PROTO((PyObject *, PyObject *)); extern PyObject *PyObject_GetAttr Py_PROTO((PyObject *, PyObject *));
extern int PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *)); extern int PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *));
extern long PyObject_Hash Py_PROTO((PyObject *)); extern long PyObject_Hash Py_PROTO((PyObject *));
......
...@@ -68,7 +68,7 @@ extern PyObject *PyErr_SetFromErrno Py_PROTO((PyObject *)); ...@@ -68,7 +68,7 @@ extern PyObject *PyErr_SetFromErrno Py_PROTO((PyObject *));
extern void PyErr_BadInternalCall Py_PROTO((void)); extern void PyErr_BadInternalCall Py_PROTO((void));
extern int sigcheck Py_PROTO((void)); /* In sigcheck.c or signalmodule.c */ extern int PyErr_CheckSignals Py_PROTO((void)); /* In sigcheck.c or signalmodule.c */
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -54,7 +54,7 @@ int Py_AtExit Py_PROTO((void (*func) Py_PROTO((void)))); ...@@ -54,7 +54,7 @@ int Py_AtExit Py_PROTO((void (*func) Py_PROTO((void))));
void Py_Exit Py_PROTO((int)); void Py_Exit Py_PROTO((int));
void cleanup Py_PROTO((void)); void Py_Cleanup Py_PROTO((void));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -25,17 +25,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -25,17 +25,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Range object interface */ /* Range object interface */
/* /*
123456789-123456789-123456789-123456789-123456789-123456789-123456789-12 A range object represents an integer range. This is an immutable object;
rangeobject represents an integer range. This is an immutable object;
a range cannot change its value after creation. a range cannot change its value after creation.
Range objects behave like the corresponding tuple objects except that Range objects behave like the corresponding tuple objects except that
they are represented by a start, stop, and step datamembers. they are represented by a start, stop, and step datamembers.
*/ */
extern DL_IMPORT PyTypeObject Rangetype; extern DL_IMPORT PyTypeObject PyRange_Type;
#define is_rangeobject(op) ((op)->ob_type == &Rangetype) #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type)
extern PyObject *newrangeobject Py_PROTO((long, long, long, int)); extern PyObject *PyRange_New Py_PROTO((long, long, long, int));
...@@ -48,6 +48,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -48,6 +48,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define newaccessobject PyAccess_FromValue #define newaccessobject PyAccess_FromValue
#define getaccessvalue PyAccess_AsValue #define getaccessvalue PyAccess_AsValue
#define setaccessvalue PyAccess_SetValue #define setaccessvalue PyAccess_SetValue
#define setaccessowner PyAccess_SetOwner
#define cloneaccessobject PyAccess_Clone
#define hasaccessvalue PyAccess_HasValue
#define Anynumbertype PyAnyNumber_Type
#define Anysequencetype PyAnySequence_Type
#define Anymappingtype PyAnyMapping_Type
#ifdef Py_TRACE_REFS #ifdef Py_TRACE_REFS
#define TRACE_REFS #define TRACE_REFS
...@@ -68,6 +74,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -68,6 +74,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define threads_started _PyThread_Started #define threads_started _PyThread_Started
#define tok_name _PyParser_TokenNames #define tok_name _PyParser_TokenNames
#define verbose Py_VerboseFlag #define verbose Py_VerboseFlag
#define suppress_print Py_SuppressPrintingFlag
#define AccessError PyExc_AccessError #define AccessError PyExc_AccessError
#define AttributeError PyExc_AttributeError #define AttributeError PyExc_AttributeError
#define ConflictError PyExc_ConflictError #define ConflictError PyExc_ConflictError
...@@ -95,6 +102,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -95,6 +102,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define Typetype PyType_Type #define Typetype PyType_Type
#define Listtype PyList_Type #define Listtype PyList_Type
#define Dicttype PyDict_Type #define Dicttype PyDict_Type
#define Mappingtype PyDict_Type
#define Tupletype PyTuple_Type #define Tupletype PyTuple_Type
#define Filetype PyFile_Type #define Filetype PyFile_Type
#define Classtype PyClass_Type #define Classtype PyClass_Type
...@@ -105,6 +113,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -105,6 +113,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define Moduletype PyModule_Type #define Moduletype PyModule_Type
#define Codetype PyCode_Type #define Codetype PyCode_Type
#define Frametype PyFrame_Type #define Frametype PyFrame_Type
#define Rangetype PyRange_Type
#define floatobject PyFloatObject #define floatobject PyFloatObject
#define intobject PyIntObject #define intobject PyIntObject
#define longobject PyLongObject #define longobject PyLongObject
...@@ -150,6 +159,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -150,6 +159,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define is_typeobject PyType_Check #define is_typeobject PyType_Check
#define is_listobject PyList_Check #define is_listobject PyList_Check
#define is_dictobject PyDict_Check #define is_dictobject PyDict_Check
#define is_mappingobject PyDict_Check
#define is_tupleobject PyTuple_Check #define is_tupleobject PyTuple_Check
#define is_fileobject PyFile_Check #define is_fileobject PyFile_Check
#define is_classobject PyClass_Check #define is_classobject PyClass_Check
...@@ -170,11 +180,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -170,11 +180,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define cmpobject PyObject_Compare #define cmpobject PyObject_Compare
#define getattr PyObject_GetAttrString #define getattr PyObject_GetAttrString
#define getattro PyObject_GetAttr #define getattro PyObject_GetAttr
#define hasattr PyObject_HasAttrString
#define hasattro PyObject_HasAttr
#define hashobject PyObject_Hash #define hashobject PyObject_Hash
#define newobject _PyObject_New #define newobject _PyObject_New
#define newvarobject _PyObject_NewVar #define newvarobject _PyObject_NewVar
#define printobject PyObject_Print #define printobject PyObject_Print
#define reprobject PyObject_Repr #define reprobject PyObject_Repr
#define strobject PyObject_Str
#define setattr PyObject_SetAttrString #define setattr PyObject_SetAttrString
#define setattro PyObject_SetAttr #define setattro PyObject_SetAttr
#define testbool PyObject_IsTrue #define testbool PyObject_IsTrue
...@@ -185,18 +198,21 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -185,18 +198,21 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define newfloatobject PyFloat_FromDouble #define newfloatobject PyFloat_FromDouble
#define getintvalue PyInt_AsLong #define getintvalue PyInt_AsLong
#define GETINTVALUE PyInt_AS_LONG #define GETINTVALUE PyInt_AS_LONG
#define getmaxint PyInt_GetMax
#define newintobject PyInt_FromLong #define newintobject PyInt_FromLong
#define alloclongobject _PyLong_New #define alloclongobject _PyLong_New
#define dgetlongvalue PyLong_AsDouble #define dgetlongvalue PyLong_AsDouble
#define dnewlongobject PyLong_FromDouble #define dnewlongobject PyLong_FromDouble
#define getlongvalue PyLong_AsLong #define getlongvalue PyLong_AsLong
#define long_scan PyLong_FromString #define long_escan PyLong_FromString
#define long_scan(a, b) PyLong_FromString((a), (char **)0, (b))
#define newlongobject PyLong_FromLong #define newlongobject PyLong_FromLong
#define formatstring PyString_Format #define formatstring PyString_Format
#define getstringsize PyString_Size #define getstringsize PyString_Size
#define getstringvalue PyString_AsString #define getstringvalue PyString_AsString
#define GETSTRINGVALUE PyString_AS_STRING #define GETSTRINGVALUE PyString_AS_STRING
#define joinstring PyString_Concat #define joinstring PyString_Concat
#define joinstring_decref PyString_ConcatAndDel
#define newsizedstringobject PyString_FromStringAndSize #define newsizedstringobject PyString_FromStringAndSize
#define newstringobject PyString_FromString #define newstringobject PyString_FromString
#define resizestring _PyString_Resize #define resizestring _PyString_Resize
...@@ -210,26 +226,40 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -210,26 +226,40 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define setlistitem PyList_SetItem #define setlistitem PyList_SetItem
#define setlistslice PyList_SetSlice #define setlistslice PyList_SetSlice
#define sortlist PyList_Sort #define sortlist PyList_Sort
#define reverselist PyList_Reverse
#define listtuple PyList_AsTuple
#define dictinsert PyDict_SetItemString #define dictinsert PyDict_SetItemString
#define dictlookup PyDict_GetItemString #define dictlookup PyDict_GetItemString
#define dictremove PyDict_DelItemString #define dictremove PyDict_DelItemString
#define getmappingitems PyDict_Items #define getmappingitems PyDict_Items
#define getdictitems PyDict_Items
#define getmappingkeys PyDict_Keys #define getmappingkeys PyDict_Keys
#define getdictkeys PyDict_Keys
#define getmappingvalues PyDict_Values #define getmappingvalues PyDict_Values
#define getdictvalues PyDict_Values
#define getmappingsize PyDict_Size
#define getdictsize PyDict_Size
#define mappingclear PyDict_Clear #define mappingclear PyDict_Clear
#define mappinggetnext PyDict_Next #define mappinggetnext PyDict_Next
#define mappinginsert PyDict_SetItem #define mappinginsert PyDict_SetItem
#define dict2insert PyDict_SetItem
#define mappinglookup PyDict_GetItem #define mappinglookup PyDict_GetItem
#define dict2lookup PyDict_GetItem
#define mappingremove PyDict_DelItem #define mappingremove PyDict_DelItem
#define dict2remove PyDict_DelItem
#define newmappingobject PyDict_New #define newmappingobject PyDict_New
#define newdictobject PyDict_New
#define gettupleitem PyTuple_GetItem #define gettupleitem PyTuple_GetItem
#define GETTUPLEITEM PyTuple_GET_ITEM #define GETTUPLEITEM PyTuple_GET_ITEM
#define gettuplesize PyTuple_Size #define gettuplesize PyTuple_Size
#define gettupleslice PyTuple_GetSlice #define gettupleslice PyTuple_GetSlice
#define newtupleobject PyTuple_New #define newtupleobject PyTuple_New
#define settupleitem PyTuple_SetItem #define settupleitem PyTuple_SetItem
#define resizetuple _PyTuple_Resize
#define filegetline PyFile_GetLine #define filegetline PyFile_GetLine
#define getfilefile PyFile_AsFile #define getfilefile PyFile_AsFile
#define getfilename PyFile_Name
#define setfilebufsize PyFile_SetBufSize
#define newfileobject PyFile_FromString #define newfileobject PyFile_FromString
#define newopenfileobject PyFile_FromFile #define newopenfileobject PyFile_FromFile
#define softspace PyFile_SoftSpace #define softspace PyFile_SoftSpace
...@@ -242,14 +272,22 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -242,14 +272,22 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define newclassobject PyClass_New #define newclassobject PyClass_New
#define newinstancemethodobject PyMethod_New #define newinstancemethodobject PyMethod_New
#define newinstanceobject PyInstance_New #define newinstanceobject PyInstance_New
#define instancebinop PyInstance_DoBinOp
#define block PyTryBlock #define block PyTryBlock
#define extend_stack PyFrame_ExtendStack #define extend_stack PyFrame_ExtendStack
#define newframeobject PyFrame_New #define newframeobject PyFrame_New
#define pop_block PyFrame_BlockPop #define pop_block PyFrame_BlockPop
#define setup_block PyFrame_BlockSetup #define setup_block PyFrame_BlockSetup
#define fast_2_locals PyFrame_FastToLocals
#define locals_2_fast PyFrame_LocalsToFast
#define getfunccode PyFunction_GetCode #define getfunccode PyFunction_GetCode
#define getfuncglobals PyFunction_GetGlobals #define getfuncglobals PyFunction_GetGlobals
#define getfuncargstuff PyFunction_GetArgStuff
#define setfuncargstuff PyFunction_SetArgStuff
#define mystrtol PyOS_strtol
#define mystrtoul PyOS_strtoul
#define newfuncobject PyFunction_New #define newfuncobject PyFunction_New
#define newrangeobject PyRange_New
#define method PyCFunction #define method PyCFunction
#define findmethod Py_FindMethod #define findmethod Py_FindMethod
#define getmethod PyCFunction_GetFunction #define getmethod PyCFunction_GetFunction
...@@ -299,6 +337,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -299,6 +337,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define add_module PyImport_AddModule #define add_module PyImport_AddModule
#define doneimport PyImport_Cleanup #define doneimport PyImport_Cleanup
#define get_modules PyImport_GetModuleDict #define get_modules PyImport_GetModuleDict
#define get_pyc_magic PyImport_GetMagicNumber
#define import_module PyImport_ImportModule #define import_module PyImport_ImportModule
#define init_frozen PyImport_ImportFrozenModule #define init_frozen PyImport_ImportFrozenModule
#define initimport PyImport_Init #define initimport PyImport_Init
...@@ -310,9 +349,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -310,9 +349,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define initmodule Py_InitModule #define initmodule Py_InitModule
#define initmodule4 Py_InitModule4 #define initmodule4 Py_InitModule4
#define rd_long PyMarshal_ReadLongFromFile #define rd_long PyMarshal_ReadLongFromFile
#define rd_short PyMarshal_ReadShortFromFile
#define rd_object PyMarshal_ReadObjectFromFile #define rd_object PyMarshal_ReadObjectFromFile
#define rds_object PyMarshal_ReadObjectFromString #define rds_object PyMarshal_ReadObjectFromString
#define wr_long PyMarshal_WriteLongToFile #define wr_long PyMarshal_WriteLongToFile
#define wr_short PyMarshal_WriteShortToFile
#define wr_object PyMarshal_WriteObjectToFile #define wr_object PyMarshal_WriteObjectToFile
#define initsys PySys_Init #define initsys PySys_Init
#define setpythonargv PySys_SetArgv #define setpythonargv PySys_SetArgv
...@@ -323,6 +364,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -323,6 +364,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define compile_string Py_CompileString #define compile_string Py_CompileString
#define fatal Py_FatalError #define fatal Py_FatalError
#define goaway Py_Exit #define goaway Py_Exit
#define cleanup Py_Cleanup
#define initall Py_Initialize #define initall Py_Initialize
#define print_error PyErr_Print #define print_error PyErr_Print
#define parse_file PyParser_SimpleParseFile #define parse_file PyParser_SimpleParseFile
...@@ -339,6 +381,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -339,6 +381,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define mkvalue Py_BuildValue #define mkvalue Py_BuildValue
#define vmkvalue Py_VaBuildValue #define vmkvalue Py_VaBuildValue
#define getargs PyArg_Parse #define getargs PyArg_Parse
#define vgetargs PyArgs_VaParse
#define newgetargs PyArg_ParseTuple #define newgetargs PyArg_ParseTuple
#define getichararg PyArg_GetChar #define getichararg PyArg_GetChar
#define getidoublearray PyArg_GetDoubleArray #define getidoublearray PyArg_GetDoubleArray
...@@ -372,6 +415,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -372,6 +415,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define initintr PyOS_InitInterrupts #define initintr PyOS_InitInterrupts
#define intrcheck PyOS_InterruptOccurred #define intrcheck PyOS_InterruptOccurred
#define getmtime PyOS_GetLastModificationTime #define getmtime PyOS_GetLastModificationTime
#define my_readline PyOS_Readline
#define realmain Py_Main
#define ref_total _Py_RefTotal
#define sigcheck PyErr_CheckSignals
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -31,8 +31,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -31,8 +31,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* String object interface */ /* String object interface */
/* /*
123456789-123456789-123456789-123456789-123456789-123456789-123456789-12
Type PyStringObject represents a character string. An extra zero byte is Type PyStringObject represents a character string. An extra zero byte is
reserved at the end to ensure it is zero-terminated, but a size is reserved at the end to ensure it is zero-terminated, but a size is
present so strings with null bytes in them can be represented. This present so strings with null bytes in them can be represented. This
...@@ -66,7 +64,7 @@ extern PyObject *PyString_FromString Py_PROTO((char *)); ...@@ -66,7 +64,7 @@ extern PyObject *PyString_FromString Py_PROTO((char *));
extern int PyString_Size Py_PROTO((PyObject *)); extern int PyString_Size Py_PROTO((PyObject *));
extern char *PyString_AsString Py_PROTO((PyObject *)); extern char *PyString_AsString Py_PROTO((PyObject *));
extern void PyString_Concat Py_PROTO((PyObject **, PyObject *)); extern void PyString_Concat Py_PROTO((PyObject **, PyObject *));
extern void joinstring_decref Py_PROTO((PyObject **, PyObject *)); extern void PyString_ConcatAndDel Py_PROTO((PyObject **, PyObject *));
extern int _PyString_Resize Py_PROTO((PyObject **, int)); extern int _PyString_Resize Py_PROTO((PyObject **, int));
extern PyObject *PyString_Format Py_PROTO((PyObject *, PyObject *)); extern PyObject *PyString_Format Py_PROTO((PyObject *, PyObject *));
......
...@@ -58,7 +58,7 @@ extern int PyTuple_Size Py_PROTO((PyObject *)); ...@@ -58,7 +58,7 @@ extern int PyTuple_Size Py_PROTO((PyObject *));
extern PyObject *PyTuple_GetItem Py_PROTO((PyObject *, int)); extern PyObject *PyTuple_GetItem Py_PROTO((PyObject *, int));
extern int PyTuple_SetItem Py_PROTO((PyObject *, int, PyObject *)); extern int PyTuple_SetItem Py_PROTO((PyObject *, int, PyObject *));
extern PyObject *PyTuple_GetSlice Py_PROTO((PyObject *, int, int)); extern PyObject *PyTuple_GetSlice Py_PROTO((PyObject *, int, int));
extern int resizetuple Py_PROTO((PyObject **, int, int)); extern int _PyTuple_Resize Py_PROTO((PyObject **, int, int));
/* Macro, trading safety for speed */ /* Macro, trading safety for speed */
#define PyTuple_GET_ITEM(op, i) ((op)->ob_item[i]) #define PyTuple_GET_ITEM(op, i) ((op)->ob_item[i])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment