diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 7 | ||||
| -rw-r--r-- | src/allobjects.h | 1 | ||||
| -rw-r--r-- | src/import.c | 2 | ||||
| -rw-r--r-- | src/listobject.c | 37 | ||||
| -rw-r--r-- | src/malloc.h | 5 | ||||
| -rw-r--r-- | src/modsupport.h | 2 | ||||
| -rw-r--r-- | src/patchlevel.h | 2 | ||||
| -rw-r--r-- | src/regexpmodule.c | 2 |
8 files changed, 34 insertions, 24 deletions
diff --git a/src/Makefile b/src/Makefile index bcec9de..3811b77 100644 --- a/src/Makefile +++ b/src/Makefile @@ -86,8 +86,8 @@ DEFPYTHONPATH= .:/usr/local/lib/python:/ufs/guido/lib/python:../lib # is missing in most systems I have encountered, so it is turned on # in the Makefile. Turn it off if your system doesn't have sys_errlist.) -STRERROR_SRC= strerror.c -STRERROR_OBJ= strerror.o +# STRERROR_SRC= strerror.c +# STRERROR_OBJ= strerror.o # If your BSD system does not have a fmod() function in the library, # uncomment the following two lines to use one I wrote. @@ -383,8 +383,7 @@ GENSOURCES= acceler.c fgetsintr.c grammar1.c \ # ============ python: libpython.a $(OBJECTS) $(LIBDEPS) Makefile - $(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o @python - mv @python python + $(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o python libpython.a: $(LIBOBJECTS) -rm -f @lib diff --git a/src/allobjects.h b/src/allobjects.h index b6b487b..fe46f54 100644 --- a/src/allobjects.h +++ b/src/allobjects.h @@ -26,6 +26,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <stdio.h> #include <string.h> +#include <stdlib.h> #include "PROTO.h" diff --git a/src/import.c b/src/import.c index d461007..59ea07e 100644 --- a/src/import.c +++ b/src/import.c @@ -167,6 +167,8 @@ load_module(name) return m; } +static int init_builtin(char *name); + object * import_module(name) char *name; diff --git a/src/listobject.c b/src/listobject.c index be1382c..9a32eac 100644 --- a/src/listobject.c +++ b/src/listobject.c @@ -25,6 +25,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* List object implementation */ #include "allobjects.h" +#include "modsupport.h" object * newlistobject(size) @@ -319,24 +320,6 @@ list_concat(a, bb) } static int -list_ass_item(a, i, v) - listobject *a; - int i; - object *v; -{ - if (i < 0 || i >= a->ob_size) { - err_setstr(IndexError, "list assignment index out of range"); - return -1; - } - if (v == NULL) - return list_ass_slice(a, i, i+1, v); - INCREF(v); - DECREF(a->ob_item[i]); - a->ob_item[i] = v; - return 0; -} - -static int list_ass_slice(a, ilow, ihigh, v) listobject *a; int ilow, ihigh; @@ -400,6 +383,24 @@ list_ass_slice(a, ilow, ihigh, v) #undef b } +static int +list_ass_item(a, i, v) + listobject *a; + int i; + object *v; +{ + if (i < 0 || i >= a->ob_size) { + err_setstr(IndexError, "list assignment index out of range"); + return -1; + } + if (v == NULL) + return list_ass_slice(a, i, i+1, v); + INCREF(v); + DECREF(a->ob_item[i]); + a->ob_item[i] = v; + return 0; +} + static object * ins(self, where, v) listobject *self; diff --git a/src/malloc.h b/src/malloc.h index c2d9969..de2cc9f 100644 --- a/src/malloc.h +++ b/src/malloc.h @@ -36,6 +36,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define HAVE_STDLIB #endif +#ifdef __STDC__ +#define ANY void +#define HAVE_STDLIB +#endif + #ifndef ANY #define ANY char #endif diff --git a/src/modsupport.h b/src/modsupport.h index 843b209..bc9929a 100644 --- a/src/modsupport.h +++ b/src/modsupport.h @@ -25,3 +25,5 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Module support interface */ extern object *initmodule PROTO((char *, struct methodlist *)); +extern int getintarg(object *v, int *a); +extern void fatal(char *msg); diff --git a/src/patchlevel.h b/src/patchlevel.h index d00491f..110c86f 100644 --- a/src/patchlevel.h +++ b/src/patchlevel.h @@ -1 +1 @@ -1 +#define PATCHLEVEL 1 diff --git a/src/regexpmodule.c b/src/regexpmodule.c index 7c87217..62b22f2 100644 --- a/src/regexpmodule.c +++ b/src/regexpmodule.c @@ -38,7 +38,7 @@ typedef struct { regexp *re_prog; /* The compiled regular expression */ } regexpobject; -extern typeobject Regexptype; /* Really static, forward */ +static typeobject Regexptype; static regexpobject * newregexpobject(string, prog) |
