Skip to content

Commit

Permalink
Fix build error with MSVC++ on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Mar 7, 2013
1 parent 89790a7 commit 1af6989
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/zope/security/_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,11 @@ MOD_INIT(_proxy)
{
PyObject *m;

MOD_DEF(m, "_proxy", module___doc__, module_functions)

if (m == NULL)
return MOD_ERROR_VAL;

if (Proxy_Import() < 0)
return MOD_ERROR_VAL;

Expand Down Expand Up @@ -1083,11 +1088,6 @@ if((str_op_##S = INTERN("__" #S "__")) == NULL) return MOD_ERROR_VAL
if (PyType_Ready(&SecurityProxyType) < 0)
return MOD_ERROR_VAL;

MOD_DEF(m, "_proxy", module___doc__, module_functions)

if (m == NULL)
return MOD_ERROR_VAL;

Py_INCREF(&SecurityProxyType);
PyModule_AddObject(m, "_Proxy", (PyObject *)&SecurityProxyType);

Expand Down
14 changes: 7 additions & 7 deletions src/zope/security/_zope_security_checker.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,13 @@ MOD_INIT(_zope_security_checker)
{
PyObject* m;

MOD_DEF(m, "_zope_security_checker", module___doc__, module_functions)

if (m == NULL)
{
return MOD_ERROR_VAL;
}

CheckerType.tp_new = PyType_GenericNew;
if (PyType_Ready(&CheckerType) < 0)
{
Expand Down Expand Up @@ -673,13 +680,6 @@ if((str_##S = INTERN(#S)) == NULL) return MOD_ERROR_VAL
return MOD_ERROR_VAL;
}

MOD_DEF(m, "_zope_security_checker", module___doc__, module_functions)

if (m == NULL)
{
return MOD_ERROR_VAL;
}

#define EXPORT(N) Py_INCREF(N); PyModule_AddObject(m, #N, N)

EXPORT(_checkers);
Expand Down

0 comments on commit 1af6989

Please sign in to comment.