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

Lots of small things, see ChangeLog

üst 31b7727b
......@@ -36,7 +36,7 @@ typedef BYTE *bitset;
bitset newbitset PROTO((int nbits));
void delbitset PROTO((bitset bs));
/* int testbit PROTO((bitset bs, int ibit)); /* Now a macro, see below */
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
int addbit PROTO((bitset bs, int ibit)); /* Returns 0 if already set */
int samebitset PROTO((bitset bs1, bitset bs2, int nbits));
void mergebitset PROTO((bitset bs1, bitset bs2, int nbits));
......@@ -49,8 +49,6 @@ void mergebitset PROTO((bitset bs1, bitset bs2, int nbits));
#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
#ifdef __cplusplus
}
#endif
......
......@@ -31,6 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Built-in module interface */
extern object *getbuiltin PROTO((object *));
extern object *getbuiltins PROTO((char *));
extern int setbuiltin PROTO((char *, object *));
#ifdef __cplusplus
......
......@@ -37,7 +37,6 @@ object *getlocals PROTO((void));
object *getowner PROTO((void));
object *getframe PROTO((void));
void printtraceback PROTO((object *));
void flushline PROTO((void));
int Py_AddPendingCall PROTO((int (*func) PROTO((ANY *)), ANY *arg));
......@@ -54,7 +53,7 @@ int Py_MakePendingCalls PROTO((void));
BGN_SAVE
...blocking system call here...
END_SAVE
...interpretr result here...
...interpret result here...
The BGN_SAVE/END_SAVE pair expands to a {}-surrounded block.
To leave the block in the middle (e.g., with return), you must insert
......
......@@ -32,9 +32,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
void err_set PROTO((object *));
void err_setval PROTO((object *, object *));
void err_restore PROTO((object *, object *, object *));
void err_setstr PROTO((object *, char *));
object *err_occurred PROTO((void));
void err_get PROTO((object **, object **));
void err_fetch PROTO((object **, object **, object **));
void err_clear PROTO((void));
/* Predefined exceptions */
......
......@@ -30,6 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Module definition and import interface */
long get_pyc_magic PROTO((void));
object *get_modules PROTO((void));
object *add_module PROTO((char *name));
object *import_module PROTO((char *name));
......
#define PATCHLEVEL "1.1.1"
#define PATCHLEVEL "1.2--"
......@@ -32,9 +32,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
void err_set PROTO((object *));
void err_setval PROTO((object *, object *));
void err_restore PROTO((object *, object *, object *));
void err_setstr PROTO((object *, char *));
object *err_occurred PROTO((void));
void err_get PROTO((object **, object **));
void err_fetch PROTO((object **, object **, object **));
void err_clear PROTO((void));
/* Predefined exceptions */
......
......@@ -114,7 +114,7 @@ typedef struct methodlist PyMethodDef;
#define PyMappingMethods mapping_methods
#define PyObject_HEAD OB_HEAD
#define PyObject_VAR_HEAD OB_VARHEAD
#define PyObject_HEAD_INIT OB_HEAD_INIT
#define PyObject_HEAD_INIT(x) OB_HEAD_INIT(x)
#define PyObject_NEW NEWOBJ
#define PyObject_NEW_VAR NEWVAROBJ
#define Py_PROTO PROTO
......@@ -345,7 +345,8 @@ typedef struct methodlist PyMethodDef;
#define PyErr_SetString err_setstr
#define PyErr_SetObject err_setval
#define PyErr_Occurred err_occurred
#define PyErr_GetAndClear err_get
#define PyErr_Fetch err_fetch
#define PyErr_Restore err_restore
#define PyErr_Clear err_clear
#define PyOS_InterruptableGetString fgets_intr
#define PyOS_InitInterrupts initintr
......
......@@ -30,6 +30,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Traceback interface */
struct _frame;
int tb_here PROTO((struct _frame *));
object *tb_fetch PROTO((void));
int tb_store PROTO((object *));
......
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