]> granicus.if.org Git - python/commitdiff
Make the framer run (still generates wrong code for module creation though.)
authorGeorg Brandl <georg@python.org>
Mon, 2 Aug 2010 22:58:25 +0000 (22:58 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 2 Aug 2010 22:58:25 +0000 (22:58 +0000)
Tools/framer/framer/bases.py
Tools/framer/framer/template.py

index 08aacb9eac4bd7245c0911dd86273c82350edeae..d19b5c98f1e2af816bc6484601052eae5632f55d 100644 (file)
@@ -199,7 +199,7 @@ class TypeMetaclass(BaseMetaclass):
         p(template.type_struct_start)
         for s in Slots[:-5]: # XXX
             val = self.__slots.get(s, s.default)
-            ntabs = 4 - (4 + len(val)) / 8
+            ntabs = 4 - (4 + len(val)) // 8
             line = "        %s,%s/* %s */" % (val, "\t" * ntabs, s.name)
             print(line, file=f)
         p(template.type_struct_end)
index 41f95371b85b0d7d003ab3bd64892d2aa046dac7..e596c1f0f20f28497088ee7286edd46345dfc393 100644 (file)
@@ -76,7 +76,7 @@ varargs = """\
 
 module_init_start = """\
 PyMODINIT_FUNC
-init%(ModuleName)s(void)
+PyInit_%(ModuleName)s(void)
 {
         PyObject *mod;