]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
explicitly init flags in methodlists
authorGuido van Rossum <guido@python.org>
Sun, 19 Feb 1995 15:55:19 +0000 (15:55 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 19 Feb 1995 15:55:19 +0000 (15:55 +0000)
Modules/regexmodule.c
Objects/fileobject.c
Objects/listobject.c

index 9b40ab591a4731feaa172a5940f466c6b5e50ed0..893f4fc31b4dc2c3e10ee8ed1d5cf4fa6ddd44d6 100644 (file)
@@ -555,11 +555,11 @@ regex_set_syntax(self, args)
 }
 
 static struct methodlist regex_global_methods[] = {
-       {"compile",     regex_compile},
-       {"symcomp",     regex_symcomp},
-       {"match",       regex_match},
-       {"search",      regex_search},
-       {"set_syntax",  regex_set_syntax},
+       {"compile",     regex_compile, 0},
+       {"symcomp",     regex_symcomp, 0},
+       {"match",       regex_match, 0},
+       {"search",      regex_search, 0},
+       {"set_syntax",  regex_set_syntax, 0},
        {NULL,          NULL}           /* sentinel */
 };
 
index 07bab90eabcebf3dadc778e6e7c7d9fbb5ad9fb5..df27caf41fba4a7944113a2d5310ecd4bad1525d 100644 (file)
@@ -29,6 +29,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "structmember.h"
 #include "ceval.h"
 
+#ifdef THINK_C
+#define HAVE_FOPENRF
+#endif
+
 #define BUF(v) GETSTRINGVALUE((stringobject *)v)
 
 #include <errno.h>
@@ -652,20 +656,20 @@ file_writelines(f, args)
 }
 
 static struct methodlist file_methods[] = {
-       {"close",       (method)file_close},
-       {"flush",       (method)file_flush},
-       {"fileno",      (method)file_fileno},
-       {"isatty",      (method)file_isatty},
-       {"read",        (method)file_read},
-       {"readline",    (method)file_readline},
-       {"readlines",   (method)file_readlines},
-       {"seek",        (method)file_seek},
+       {"close",       (method)file_close, 0},
+       {"flush",       (method)file_flush, 0},
+       {"fileno",      (method)file_fileno, 0},
+       {"isatty",      (method)file_isatty, 0},
+       {"read",        (method)file_read, 0},
+       {"readline",    (method)file_readline, 0},
+       {"readlines",   (method)file_readlines, 0},
+       {"seek",        (method)file_seek, 0},
 #ifdef HAVE_FTRUNCATE
-       {"truncate",    (method)file_truncate},
+       {"truncate",    (method)file_truncate, 0},
 #endif
-       {"tell",        (method)file_tell},
-       {"write",       (method)file_write},
-       {"writelines",  (method)file_writelines},
+       {"tell",        (method)file_tell, 0},
+       {"write",       (method)file_write, 0},
+       {"writelines",  (method)file_writelines, 0},
        {NULL,          NULL}           /* sentinel */
 };
 
index f0eab0bb3bdc6e03b53a3efb7935e6bb1c594131..a367ed1a270e7a6c729f3cc61ca5e1aa7dd2035d 100644 (file)
@@ -751,7 +751,7 @@ static struct methodlist list_methods[] = {
        {"count",       (method)listcount},
        {"index",       (method)listindex},
        {"insert",      (method)listinsert},
-       {"sort",        (method)listsort},
+       {"sort",        (method)listsort, 0},
        {"remove",      (method)listremove},
        {"reverse",     (method)listreverse},
        {NULL,          NULL}           /* sentinel */