Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b73cc04

Browse files
committed
* ceval.c, longobject.c, methodobject.c, listnode.c, arraymodule.c,
pythonrun.c: added static forward declarations * pythonrun.h, ceval.h, longobject.h, node.h: removed declarations of static routines
1 parent c7a2270 commit b73cc04

10 files changed

Lines changed: 14 additions & 10 deletions

File tree

Include/ceval.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ object *call_object PROTO((object *, object *));
3535
object *getglobals PROTO((void));
3636
object *getlocals PROTO((void));
3737
object *getowner PROTO((void));
38-
void mergelocals PROTO((void));
3938

4039
void printtraceback PROTO((object *));
4140
void flushline PROTO((void));

Include/longobject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern object *dnewlongobject PROTO((double));
4141
extern long getlongvalue PROTO((object *));
4242
extern double dgetlongvalue PROTO((object *));
4343

44-
object *long_format PROTO((object *, int));
4544
object *long_scan PROTO((char *, int));
4645

4746
#ifdef __cplusplus

Include/node.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ extern void freetree PROTO((node *n));
6161
#endif
6262

6363
extern void listtree PROTO((node *));
64-
extern void listnode PROTO((FILE *, node *));
6564

6665
#ifdef __cplusplus
6766
}

Include/pythonrun.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@ int run_tty_loop PROTO((FILE *, char *));
4242
int parse_string PROTO((char *, int, struct _node **));
4343
int parse_file PROTO((FILE *, char *, int, struct _node **));
4444

45-
object *eval_node PROTO((struct _node *, char *, object *, object *));
46-
4745
object *run_string PROTO((char *, int, object *, object *));
4846
object *run_file PROTO((FILE *, char *, int, object *, object *));
49-
object *run_err_node PROTO((int, struct _node *, char *, object *, object *));
50-
object *run_node PROTO((struct _node *, char *, object *, object *));
5147

5248
object *compile_string PROTO((char *, char *, int));
5349

Modules/arraymodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ extern typeobject Arraytype;
6666

6767
#define is_arrayobject(op) ((op)->ob_type == &Arraytype)
6868

69+
/* Forward */
6970
extern object *newarrayobject PROTO((int, struct arraydescr *));
7071
extern int getarraysize PROTO((object *));
7172
extern object *getarrayitem PROTO((object *, int));
72-
extern int setarrayitem PROTO((object *, int, object *));
73+
static int setarrayitem PROTO((object *, int, object *));
7374
extern int insarrayitem PROTO((object *, int, object *));
7475
extern int addarrayitem PROTO((object *, object *));
7576

Objects/longobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static longobject *long_normalize PROTO((longobject *));
3939
static longobject *mul1 PROTO((longobject *, wdigit));
4040
static longobject *muladd1 PROTO((longobject *, wdigit, wdigit));
4141
static longobject *divrem1 PROTO((longobject *, wdigit, digit *));
42+
static object *long_format PROTO((object *aa, int base));
4243

4344
static int ticker; /* XXX Could be shared with ceval? */
4445

Objects/methodobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ typeobject Methodtype = {
161161
meth_hash, /*tp_hash*/
162162
};
163163

164-
object *listmethods PROTO((struct methodlist *)); /* Forward */
164+
static object *listmethods PROTO((struct methodlist *)); /* Forward */
165165

166166
static object *
167167
listmethods(ml)

Parser/listnode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3030

3131
/* Forward */
3232
static void list1node PROTO((FILE *, node *));
33+
static void listnode PROTO((FILE *, node *));
3334

3435
void
3536
listtree(n)

Python/ceval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static void locals_2_fast PROTO((frameobject *, int));
9494
static void fast_2_locals PROTO((frameobject *));
9595
static int access_statement PROTO((object *, object *, frameobject *));
9696
static int exec_statement PROTO((object *, object *, object *));
97+
static void mergelocals PROTO(());
9798

9899

99100
/* Pointer to current frame, used to link new frames to */

Python/pythonrun.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ extern char *getpythonpath();
5151

5252
extern grammar gram; /* From graminit.c */
5353

54-
void initsigs(); /* Forward */
54+
/* Forward */
55+
static object *run_err_node PROTO((int err, node *n, char *filename,
56+
object *globals, object *locals));
57+
static object *run_node PROTO((node *n, char *filename,
58+
object *globals, object *locals));
59+
static object *eval_node PROTO((node *n, char *filename,
60+
object *globals, object *locals));
61+
void initsigs PROTO(());
5562

5663
int debugging; /* Needed by parser.c */
5764
int verbose; /* Needed by import.c */

0 commit comments

Comments
 (0)