comparison mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c @ 37178:68ee61822182

thirdparty: port zope.interface to relative imports By using relative imports, we're guaranteed to get modules vendored with Mercurial rather than other random modules that might be in sys.path. My editor strips trailing whitespace on save. So some minor source code cleanup was also performed as part of this commit. # no-check-commit because some modified lines have double newlines Differential Revision: https://phab.mercurial-scm.org/D2930
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 21 Mar 2018 19:52:30 -0700
parents 943d77fc07a3
children
comparison
equal deleted inserted replaced
37177:338367d44d34 37178:68ee61822182
45 static int 45 static int
46 import_declarations(void) 46 import_declarations(void)
47 { 47 {
48 PyObject *declarations, *i; 48 PyObject *declarations, *i;
49 49
50 declarations = PyImport_ImportModule("zope.interface.declarations"); 50 declarations = PyImport_ImportModule(
51 "mercurial.thirdparty.zope.interface.declarations");
51 if (declarations == NULL) 52 if (declarations == NULL)
52 return -1; 53 return -1;
53 54
54 BuiltinImplementationSpecifications = PyObject_GetAttrString( 55 BuiltinImplementationSpecifications = PyObject_GetAttrString(
55 declarations, "BuiltinImplementationSpecifications"); 56 declarations, "BuiltinImplementationSpecifications");
1334 1335
1335 1336
1336 static void 1337 static void
1337 verifying_dealloc(verify *self) 1338 verifying_dealloc(verify *self)
1338 { 1339 {
1339 PyObject_GC_UnTrack((PyObject *)self); 1340 PyObject_GC_UnTrack((PyObject *)self);
1340 verifying_clear(self); 1341 verifying_clear(self);
1341 Py_TYPE(self)->tp_free((PyObject*)self); 1342 Py_TYPE(self)->tp_free((PyObject*)self);
1342 } 1343 }
1343 1344
1344 /* 1345 /*