diff options
author | Guido van Rossum <guido@python.org> | 1993-06-17 12:35:49 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-06-17 12:35:49 (GMT) |
commit | 234f942aefb779efa6cfb7225e21d16a3f7e80f7 (patch) | |
tree | 9c85e1ae919ebb44c0a1ca48bdfd11d5f60c7d9c /Objects | |
parent | 6a0e2282c359801bd70742642d24f7b0b74f5b4e (diff) | |
download | cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.zip cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.gz cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.bz2 |
* Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile.
* cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also
changed files that still used it... And made several things static
that weren't but should have been... And other minor cleanups...
* listobject.[ch]: add external interfaces {set,get}listslice
* socketmodule.c: fix bugs in new send() argument parsing.
* sunaudiodevmodule.c: added flush() and close().
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/accessobject.c | 7 | ||||
-rw-r--r-- | Objects/fileobject.c | 2 | ||||
-rw-r--r-- | Objects/floatobject.c | 4 | ||||
-rw-r--r-- | Objects/listobject.c | 27 | ||||
-rw-r--r-- | Objects/longobject.c | 4 | ||||
-rw-r--r-- | Objects/stringobject.c | 4 | ||||
-rw-r--r-- | Objects/tupleobject.c | 2 |
7 files changed, 42 insertions, 8 deletions
diff --git a/Objects/accessobject.c b/Objects/accessobject.c index 1275eba..c9b7ce3 100644 --- a/Objects/accessobject.c +++ b/Objects/accessobject.c @@ -24,6 +24,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Access object implementation */ +/* XXX TO DO LIST + - need a "super user" mechanism for debugger etc. + - __init__ and __del__ (and all other similar methods) + should be usable even when private, not ignored + - "from foo import bar" should check access of bar +*/ + #include "allobjects.h" #include "structmember.h" diff --git a/Objects/fileobject.c b/Objects/fileobject.c index faf7e86..15263d3 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -328,7 +328,7 @@ file_read(f, args) < 0: strip trailing '\n', raise EOFError if EOF reached immediately */ -object * +static object * getline(f, n) fileobject *f; int n; diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 6a95ebf..25ae6d8 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -70,7 +70,7 @@ newfloatobject(fval) return (object *) op; } -void +static void float_dealloc(op) object *op; { @@ -329,7 +329,7 @@ float_nonzero(v) return v->ob_fval != 0.0; } -int +static int float_coerce(pv, pw) object **pv; object **pw; diff --git a/Objects/listobject.c b/Objects/listobject.c index 9a1fe23..b51e3d8 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -207,7 +207,7 @@ list_print(op, fp, flags) return 0; } -object * +static object * list_repr(v) listobject *v; { @@ -291,6 +291,18 @@ list_slice(a, ilow, ihigh) return (object *)np; } +object * +getlistslice(a, ilow, ihigh) + object *a; + int ilow, ihigh; +{ + if (!is_listobject(a)) { + err_badcall(); + return NULL; + } + return list_slice((listobject *)a, ilow, ihigh); +} + static object * list_concat(a, bb) listobject *a; @@ -422,6 +434,19 @@ list_ass_slice(a, ilow, ihigh, v) #undef b } +int +setlistslice(a, ilow, ihigh, v) + object *a; + int ilow, ihigh; + object *v; +{ + if (!is_listobject(a)) { + err_badcall(); + return NULL; + } + return list_ass_slice((listobject *)a, ilow, ihigh, v); +} + static int list_ass_item(a, i, v) listobject *a; diff --git a/Objects/longobject.c b/Objects/longobject.c index fb82a1f..8c0b6c1 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -261,7 +261,7 @@ divrem1(a, n, prem) If base is 8 or 16, add the proper prefix '0' or '0x'. External linkage: used in bltinmodule.c by hex() and oct(). */ -object * +static object * long_format(aa, base) object *aa; int base; @@ -1275,7 +1275,7 @@ long_or(a, b) return long_bitwise(a, '|', b); } -int +static int long_coerce(pv, pw) object **pv; object **pw; diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 33fe485..cba8c92 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -60,7 +60,7 @@ newstringobject(str) return (object *) op; } -void +static void string_dealloc(op) object *op; { @@ -676,6 +676,8 @@ formatstring(format, args) "unsupported format character"); goto error; } + /* XXX There's a bug somewhere here so that + XXX '%4d'%-1 yields '- 1' ... */ if (sign) { if (*buf == '-' || *buf == '+') { sign = *buf++; diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 9eb332b..faf46d5 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -136,7 +136,7 @@ tupleprint(op, fp, flags) return 0; } -object * +static object * tuplerepr(v) tupleobject *v; { |