]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
* Modules/{Setup.in,Makefile.pre.in}: renamed some modules to
authorGuido van Rossum <guido@python.org>
Fri, 5 Aug 1994 13:44:50 +0000 (13:44 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 5 Aug 1994 13:44:50 +0000 (13:44 +0000)
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

Modules/Makefile.pre.in
Modules/Setup.in
Modules/regexpr.c
Modules/socketmodule.c
Modules/stropmodule.c

index 0b4fa5b531ce87bec00c0f3d278b1066b6bf619f..7ef0b0b163a89e113f507f9ef982833dfbeb42e0 100644 (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
index f7b5bace3d9a09fb0ccb8fd0c0775d6f92f1e3c5..171755c5f8263aa65b544a399ef28954e6b46bf4 100644 (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
index f87755870e19bca072d20ed2e3ed877d7b8ab3eb..841f500d095b100911cb6b42b170f212308f0cc8 100644 (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);
 }
index 32f22db827266a5e87c8455ac409766dfa9cb1ab..6340fbcc73bae355f1b6bfda04fe2f73b60e78c2 100644 (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},
index c9802727952316ddf435fa845f6ab3a8da637057..0fd09b06d3cf9d4eb6184ed3540007901e503071 100644 (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] &&