summaryrefslogtreecommitdiffstats
path: root/Include/frameobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-01-20 04:16:40 (GMT)
committerGuido van Rossum <guido@python.org>1997-01-20 04:16:40 (GMT)
commitcdf578ebaf53ece3a639e3042c7e122774262aa7 (patch)
tree1989e0242c8d6487ea469ed49fc03e1c339a7643 /Include/frameobject.h
parent7eb883a18e2260c73fd08073b640eac07c6788c7 (diff)
downloadcpython-cdf578ebaf53ece3a639e3042c7e122774262aa7.zip
cpython-cdf578ebaf53ece3a639e3042c7e122774262aa7.tar.gz
cpython-cdf578ebaf53ece3a639e3042c7e122774262aa7.tar.bz2
New lay-out of frame object, for fewer mallocs.
See frameobject.c checkin message.
Diffstat (limited to 'Include/frameobject.h')
-rw-r--r--Include/frameobject.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/Include/frameobject.h b/Include/frameobject.h
index 85c1f4c..22cc23c 100644
--- a/Include/frameobject.h
+++ b/Include/frameobject.h
@@ -50,18 +50,17 @@ typedef struct _frame {
PyObject *f_builtins; /* builtin symbol table (PyDictObject) */
PyObject *f_globals; /* global symbol table (PyDictObject) */
PyObject *f_locals; /* local symbol table (PyDictObject) */
- PyObject *f_owner; /* owner (e.g. class or module) or NULL */
- PyObject *f_fastlocals; /* fast local variables (PyListObject) */
- PyObject **f_valuestack; /* malloc'ed array */
- PyTryBlock *f_blockstack; /* malloc'ed array */
- int f_nvalues; /* size of f_valuestack */
- int f_nblocks; /* size of f_blockstack */
- int f_iblock; /* index in f_blockstack */
+ PyObject **f_valuestack; /* points after the last local */
+ PyObject *f_trace; /* Trace function */
int f_lasti; /* Last instruction if called */
int f_lineno; /* Current line number */
int f_restricted; /* Flag set if restricted operations
in this scope */
- PyObject *f_trace; /* Trace function */
+ int f_iblock; /* index in f_blockstack */
+ PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
+ int f_nlocals; /* number of locals */
+ int f_stacksize; /* size of value stack */
+ PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
} PyFrameObject;
@@ -73,7 +72,7 @@ extern DL_IMPORT(PyTypeObject) PyFrame_Type;
PyFrameObject * PyFrame_New
Py_PROTO((PyFrameObject *, PyCodeObject *,
- PyObject *, PyObject *, PyObject *, int, int));
+ PyObject *, PyObject *));
/* The rest of the interface is specific for frame objects */
l kwb">struct QFileInfoCache; class Q_EXPORT QFileInfo // file information class { public: enum PermissionSpec { ReadUser = 0400, WriteUser = 0200, ExeUser = 0100, ReadGroup = 0040, WriteGroup = 0020, ExeGroup = 0010, ReadOther = 0004, WriteOther = 0002, ExeOther = 0001 }; QFileInfo(); QFileInfo( const QString &file ); QFileInfo( const QFile & ); #ifndef QT_NO_DIR QFileInfo( const QDir &, const QString &fileName ); #endif QFileInfo( const QFileInfo & ); ~QFileInfo(); QFileInfo &operator=( const QFileInfo & ); void setFile( const QString &file ); void setFile( const QFile & ); #ifndef QT_NO_DIR void setFile( const QDir &, const QString &fileName ); #endif bool exists() const; void refresh() const; bool caching() const; void setCaching( bool ); QString filePath() const; QString fileName() const; #ifndef QT_NO_DIR //### QString absFilePath() const; #endif QString baseName() const; QString extension( bool complete = TRUE ) const; #ifndef QT_NO_DIR //### QString dirPath( bool absPath = FALSE ) const; #endif #ifndef QT_NO_DIR QDir dir( bool absPath = FALSE ) const; #endif bool isReadable() const; bool isWritable() const; bool isExecutable() const; #ifndef QT_NO_DIR //### bool isRelative() const; bool convertToAbs(); #endif bool isFile() const; bool isDir() const; bool isSymLink() const; QString readLink() const; QString owner() const; uint ownerId() const; QString group() const; uint groupId() const; bool permission( int permissionSpec ) const; uint size() const; QDateTime lastModified() const; QDateTime lastRead() const; private: void doStat() const; static void slashify( QString & ); static void makeAbs( QString & ); QString fn; QFileInfoCache *fic; bool cache; }; inline bool QFileInfo::caching() const { return cache; } #endif // QFILEINFO_H