diff options
author | Charles-Francois Natali <cf.natali@gmail.com> | 2013-05-20 17:13:19 (GMT) |
---|---|---|
committer | Charles-Francois Natali <cf.natali@gmail.com> | 2013-05-20 17:13:19 (GMT) |
commit | 74ca886788fd116b026fdaa5980a48f09bce9bef (patch) | |
tree | e28c3c619a57f1cb35659b51adfdb53c2d68b68f /Modules/syslogmodule.c | |
parent | d66b10e165d784ae7ea0d875f11153f1dff76fd8 (diff) | |
download | cpython-74ca886788fd116b026fdaa5980a48f09bce9bef.zip cpython-74ca886788fd116b026fdaa5980a48f09bce9bef.tar.gz cpython-74ca886788fd116b026fdaa5980a48f09bce9bef.tar.bz2 |
Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
Diffstat (limited to 'Modules/syslogmodule.c')
-rw-r--r-- | Modules/syslogmodule.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 8b877cf..9d79eec 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -278,44 +278,44 @@ PyInit_syslog(void) /* Add some symbolic constants to the module */ /* Priorities */ - PyModule_AddIntConstant(m, "LOG_EMERG", LOG_EMERG); - PyModule_AddIntConstant(m, "LOG_ALERT", LOG_ALERT); - PyModule_AddIntConstant(m, "LOG_CRIT", LOG_CRIT); - PyModule_AddIntConstant(m, "LOG_ERR", LOG_ERR); - PyModule_AddIntConstant(m, "LOG_WARNING", LOG_WARNING); - PyModule_AddIntConstant(m, "LOG_NOTICE", LOG_NOTICE); - PyModule_AddIntConstant(m, "LOG_INFO", LOG_INFO); - PyModule_AddIntConstant(m, "LOG_DEBUG", LOG_DEBUG); + PyModule_AddIntMacro(m, LOG_EMERG); + PyModule_AddIntMacro(m, LOG_ALERT); + PyModule_AddIntMacro(m, LOG_CRIT); + PyModule_AddIntMacro(m, LOG_ERR); + PyModule_AddIntMacro(m, LOG_WARNING); + PyModule_AddIntMacro(m, LOG_NOTICE); + PyModule_AddIntMacro(m, LOG_INFO); + PyModule_AddIntMacro(m, LOG_DEBUG); /* openlog() option flags */ - PyModule_AddIntConstant(m, "LOG_PID", LOG_PID); - PyModule_AddIntConstant(m, "LOG_CONS", LOG_CONS); - PyModule_AddIntConstant(m, "LOG_NDELAY", LOG_NDELAY); + PyModule_AddIntMacro(m, LOG_PID); + PyModule_AddIntMacro(m, LOG_CONS); + PyModule_AddIntMacro(m, LOG_NDELAY); #ifdef LOG_ODELAY - PyModule_AddIntConstant(m, "LOG_ODELAY", LOG_ODELAY); + PyModule_AddIntMacro(m, LOG_ODELAY); #endif #ifdef LOG_NOWAIT - PyModule_AddIntConstant(m, "LOG_NOWAIT", LOG_NOWAIT); + PyModule_AddIntMacro(m, LOG_NOWAIT); #endif #ifdef LOG_PERROR - PyModule_AddIntConstant(m, "LOG_PERROR", LOG_PERROR); + PyModule_AddIntMacro(m, LOG_PERROR); #endif /* Facilities */ - PyModule_AddIntConstant(m, "LOG_KERN", LOG_KERN); - PyModule_AddIntConstant(m, "LOG_USER", LOG_USER); - PyModule_AddIntConstant(m, "LOG_MAIL", LOG_MAIL); - PyModule_AddIntConstant(m, "LOG_DAEMON", LOG_DAEMON); - PyModule_AddIntConstant(m, "LOG_AUTH", LOG_AUTH); - PyModule_AddIntConstant(m, "LOG_LPR", LOG_LPR); - PyModule_AddIntConstant(m, "LOG_LOCAL0", LOG_LOCAL0); - PyModule_AddIntConstant(m, "LOG_LOCAL1", LOG_LOCAL1); - PyModule_AddIntConstant(m, "LOG_LOCAL2", LOG_LOCAL2); - PyModule_AddIntConstant(m, "LOG_LOCAL3", LOG_LOCAL3); - PyModule_AddIntConstant(m, "LOG_LOCAL4", LOG_LOCAL4); - PyModule_AddIntConstant(m, "LOG_LOCAL5", LOG_LOCAL5); - PyModule_AddIntConstant(m, "LOG_LOCAL6", LOG_LOCAL6); - PyModule_AddIntConstant(m, "LOG_LOCAL7", LOG_LOCAL7); + PyModule_AddIntMacro(m, LOG_KERN); + PyModule_AddIntMacro(m, LOG_USER); + PyModule_AddIntMacro(m, LOG_MAIL); + PyModule_AddIntMacro(m, LOG_DAEMON); + PyModule_AddIntMacro(m, LOG_AUTH); + PyModule_AddIntMacro(m, LOG_LPR); + PyModule_AddIntMacro(m, LOG_LOCAL0); + PyModule_AddIntMacro(m, LOG_LOCAL1); + PyModule_AddIntMacro(m, LOG_LOCAL2); + PyModule_AddIntMacro(m, LOG_LOCAL3); + PyModule_AddIntMacro(m, LOG_LOCAL4); + PyModule_AddIntMacro(m, LOG_LOCAL5); + PyModule_AddIntMacro(m, LOG_LOCAL6); + PyModule_AddIntMacro(m, LOG_LOCAL7); #ifndef LOG_SYSLOG #define LOG_SYSLOG LOG_DAEMON @@ -330,13 +330,13 @@ PyInit_syslog(void) #define LOG_CRON LOG_DAEMON #endif - PyModule_AddIntConstant(m, "LOG_SYSLOG", LOG_SYSLOG); - PyModule_AddIntConstant(m, "LOG_CRON", LOG_CRON); - PyModule_AddIntConstant(m, "LOG_UUCP", LOG_UUCP); - PyModule_AddIntConstant(m, "LOG_NEWS", LOG_NEWS); + PyModule_AddIntMacro(m, LOG_SYSLOG); + PyModule_AddIntMacro(m, LOG_CRON); + PyModule_AddIntMacro(m, LOG_UUCP); + PyModule_AddIntMacro(m, LOG_NEWS); #ifdef LOG_AUTHPRIV - PyModule_AddIntConstant(m, "LOG_AUTHPRIV", LOG_AUTHPRIV); + PyModule_AddIntMacro(m, LOG_AUTHPRIV); #endif return m; |