mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
explicitly init flags in methodlists
This commit is contained in:
parent
2b7e04a9d9
commit
295d171650
3 changed files with 22 additions and 18 deletions
|
@ -555,11 +555,11 @@ regex_set_syntax(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct methodlist regex_global_methods[] = {
|
static struct methodlist regex_global_methods[] = {
|
||||||
{"compile", regex_compile},
|
{"compile", regex_compile, 0},
|
||||||
{"symcomp", regex_symcomp},
|
{"symcomp", regex_symcomp, 0},
|
||||||
{"match", regex_match},
|
{"match", regex_match, 0},
|
||||||
{"search", regex_search},
|
{"search", regex_search, 0},
|
||||||
{"set_syntax", regex_set_syntax},
|
{"set_syntax", regex_set_syntax, 0},
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#include "ceval.h"
|
#include "ceval.h"
|
||||||
|
|
||||||
|
#ifdef THINK_C
|
||||||
|
#define HAVE_FOPENRF
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BUF(v) GETSTRINGVALUE((stringobject *)v)
|
#define BUF(v) GETSTRINGVALUE((stringobject *)v)
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -652,20 +656,20 @@ file_writelines(f, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct methodlist file_methods[] = {
|
static struct methodlist file_methods[] = {
|
||||||
{"close", (method)file_close},
|
{"close", (method)file_close, 0},
|
||||||
{"flush", (method)file_flush},
|
{"flush", (method)file_flush, 0},
|
||||||
{"fileno", (method)file_fileno},
|
{"fileno", (method)file_fileno, 0},
|
||||||
{"isatty", (method)file_isatty},
|
{"isatty", (method)file_isatty, 0},
|
||||||
{"read", (method)file_read},
|
{"read", (method)file_read, 0},
|
||||||
{"readline", (method)file_readline},
|
{"readline", (method)file_readline, 0},
|
||||||
{"readlines", (method)file_readlines},
|
{"readlines", (method)file_readlines, 0},
|
||||||
{"seek", (method)file_seek},
|
{"seek", (method)file_seek, 0},
|
||||||
#ifdef HAVE_FTRUNCATE
|
#ifdef HAVE_FTRUNCATE
|
||||||
{"truncate", (method)file_truncate},
|
{"truncate", (method)file_truncate, 0},
|
||||||
#endif
|
#endif
|
||||||
{"tell", (method)file_tell},
|
{"tell", (method)file_tell, 0},
|
||||||
{"write", (method)file_write},
|
{"write", (method)file_write, 0},
|
||||||
{"writelines", (method)file_writelines},
|
{"writelines", (method)file_writelines, 0},
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -751,7 +751,7 @@ static struct methodlist list_methods[] = {
|
||||||
{"count", (method)listcount},
|
{"count", (method)listcount},
|
||||||
{"index", (method)listindex},
|
{"index", (method)listindex},
|
||||||
{"insert", (method)listinsert},
|
{"insert", (method)listinsert},
|
||||||
{"sort", (method)listsort},
|
{"sort", (method)listsort, 0},
|
||||||
{"remove", (method)listremove},
|
{"remove", (method)listremove},
|
||||||
{"reverse", (method)listreverse},
|
{"reverse", (method)listreverse},
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue