* Modules/{Setup.in,Makefile.pre.in}: renamed some modules to

shorter names (dropped the "module" from the name): sunaudiodev,
	imgformat, audioop, imageop, imgfile

	* Modules/stropmodule.c (strop_rindex): make rindex('abc', '') do
	the right thing (i.e. return 3 instead of 0)

	* Modules/socketmodule.c: disabled allowbroadcast() socket method
This commit is contained in:
Guido van Rossum 1994-08-05 13:44:50 +00:00
parent 781db5d0bb
commit c65a525cdc
5 changed files with 21 additions and 10 deletions

View File

@ -98,7 +98,7 @@ glmodule.c: $(srcdir)/cgen.py $(srcdir)/cstubs
almodule.o: almodule.c
arraymodule.o: arraymodule.c
audioopmodule.o: audioopmodule.c
audioop.o: audioop.c
cdmodule.o: cdmodule.c
clmodule.o: clmodule.c
dbmmodule.o: dbmmodule.c
@ -106,8 +106,8 @@ fcntlmodule.o: fcntlmodule.c
flmodule.o: flmodule.c
fmmodule.o: fmmodule.c
glmodule.o: glmodule.c
imageopmodule.o: imageopmodule.c
imgfilemodule.o: imgfilemodule.c
imageop.o: imageop.c
imgfile.o: imgfile.c
mathmodule.o: mathmodule.c
md5c.o: md5c.c
md5module.o: md5module.c
@ -126,7 +126,7 @@ socketmodule.o: socketmodule.c
stdwinmodule.o: stdwinmodule.c
stropmodule.o: stropmodule.c
structmodule.o: structmodule.c
sunaudiodevmodule.o: sunaudiodevmodule.c
sunaudiodev.o: sunaudiodev.c
svmodule.o: svmodule.c
threadmodule.o: threadmodule.c
timemodule.o: timemodule.c

View File

@ -93,8 +93,8 @@ socket socketmodule.o # socket(2); not on ancient System V
# Multimedia modules -- on by default.
# These represent audio samples or images as strings
audioop audioopmodule.o # Operations on audio samples
imageop imageopmodule.o # Operations on images
audioop audioop.o # Operations on audio samples
imageop imageop.o # Operations on images
rgbimg rgbimgmodule.o # Read SGI RGB image files (but coded portably)
@ -148,7 +148,7 @@ rotor rotormodule.o
#cl clmodule.o -lcl # -lawareaudio
#fm fmmodule.o -lfm_s -lgl_s
#gl glmodule.o -lgl_s -lX11_s
#imgfile imgfilemodule.o -limage -lgutil
#imgfile imgfile.o -limage -lgutil
#sgi sgimodule.o
#sv svmodule.o yuvconvert.o -lsvideo -lXext -lX11_s
@ -165,7 +165,7 @@ rotor rotormodule.o
# SunOS specific modules -- off by default
# sunaudiodev sunaudiodevmodule.o
# sunaudiodev sunaudiodev.o
# Thread module -- works on SGI IRIX and on SunOS 5.x (SOLARIS) only.
@ -196,7 +196,7 @@ rotor rotormodule.o
# Jack Jansen's imgformat module
# imgformat imgformatmodule.o
# imgformat imgformat.o
# Lance Ellinghouse's syslog module

View File

@ -1251,6 +1251,11 @@ regexp_registers_t regs;
goto error;
failure_stack_start = (struct failure_point *)
malloc(MAX_FAILURES * sizeof(*failure_stack_start));
if (failure_stack_start == NULL)
{
failure_stack_start = initial_failure_stack;
goto error;
}
failure_stack_end = failure_stack_start + MAX_FAILURES;
memcpy((char *)failure_stack_start, (char *)initial_failure_stack,
INITIAL_FAILURES * sizeof(*failure_stack_start));
@ -1529,6 +1534,8 @@ char *s;
/* the buffer will be allocated automatically */
re_comp_buf.fastmap = malloc(256);
re_comp_buf.translate = NULL;
if (re_comp_buf.fastmap == NULL)
return "Out of memory";
}
return re_compile_pattern(s, strlen(s), &re_comp_buf);
}

View File

@ -380,6 +380,7 @@ sock_accept(s, args)
}
#if 0
/* s.allowbroadcast() method */
/* XXX obsolete -- will disappear in next release */
@ -399,6 +400,7 @@ sock_allowbroadcast(s, args)
INCREF(None);
return None;
}
#endif
/* s.setsockopt() method.
@ -796,7 +798,9 @@ sock_shutdown(s, args)
static struct methodlist sock_methods[] = {
{"accept", (method)sock_accept},
#if 0
{"allowbroadcast", (method)sock_allowbroadcast},
#endif
{"setsockopt", (method)sock_setsockopt},
{"getsockopt", (method)sock_getsockopt},
{"bind", (method)sock_bind},

View File

@ -256,7 +256,7 @@ strop_rindex(self, args)
}
if (n == 0)
return newintobject((long)i);
return newintobject((long)len);
for (j = len-n; j >= i; --j)
if (s[j] == sub[0] &&