Commit d25a639a authored by Stefan Behnel's avatar Stefan Behnel

remove useless semicolons in Python code

--HG--
extra : rebase_source : cf2a0d87f2f903179cc954ff092c79fef7b13a34
parent 9fcaef13
......@@ -1073,7 +1073,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
for entry in cpp_class_attrs:
code.putln("new((void*)&(p->%s)) %s();" %
(entry.cname, entry.type.declaration_code("")));
(entry.cname, entry.type.declaration_code("")))
for entry in py_attrs:
if scope.is_internal or entry.name == "__weakref__":
......@@ -1100,7 +1100,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln(
"if (%s(%s) < 0) {" %
(new_func_entry.func_cname, cinit_args))
code.put_decref_clear("o", py_object_type, nanny=False);
code.put_decref_clear("o", py_object_type, nanny=False)
code.putln(
"}")
code.putln(
......@@ -1133,7 +1133,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# We must mark ths object as (gc) untracked while tearing it down, lest
# the garbage collection is invoked while running this destructor.
if scope.needs_gc():
code.putln("PyObject_GC_UnTrack(o);");
code.putln("PyObject_GC_UnTrack(o);")
# call the user's __dealloc__
self.generate_usr_dealloc_call(scope, code)
......@@ -1161,7 +1161,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# The base class deallocator probably expects this to be tracked, so
# undo the untracking above.
if scope.needs_gc():
code.putln("PyObject_GC_Track(o);");
code.putln("PyObject_GC_Track(o);")
if base_type:
tp_dealloc = TypeSlots.get_base_slot_function(scope, tp_slot)
......@@ -1857,8 +1857,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env.use_utility_code(UtilityCode.load("CheckBinaryVersion", "ModuleSetupCode.c"))
code.putln("if ( __Pyx_check_binary_version() < 0) %s" % code.error_goto(self.pos))
code.putln("%s = PyTuple_New(0); %s" % (Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos)));
code.putln("%s = PyBytes_FromStringAndSize(\"\", 0); %s" % (Naming.empty_bytes, code.error_goto_if_null(Naming.empty_bytes, self.pos)));
code.putln("%s = PyTuple_New(0); %s" % (Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos)))
code.putln("%s = PyBytes_FromStringAndSize(\"\", 0); %s" % (Naming.empty_bytes, code.error_goto_if_null(Naming.empty_bytes, self.pos)))
code.putln("#ifdef __Pyx_CyFunction_USED")
code.putln("if (__Pyx_CyFunction_init() < 0) %s" % code.error_goto(self.pos))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment