From ad9a2205b61d9084f120ef50dce7011adf67a8aa Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Thu, 7 Jan 2010 10:28:31 -0800 Subject: [PATCH] initalized -> initialized --- Cython/Compiler/ExprNodes.py | 12 ++++++------ Cython/Compiler/Nodes.py | 6 +++--- Cython/Compiler/Symtab.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 22a4092d..2168b442 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1151,7 +1151,7 @@ class NameNode(AtomicExprNode): else: type = py_object_type self.entry = env.declare_var(self.name, type, self.pos) - env.control_flow.set_state(self.pos, (self.name, 'initalized'), True) + env.control_flow.set_state(self.pos, (self.name, 'initialized'), True) env.control_flow.set_state(self.pos, (self.name, 'source'), 'assignment') if self.entry.is_declared_generic: self.result_ctype = py_object_type @@ -1294,13 +1294,13 @@ class NameNode(AtomicExprNode): elif entry.is_local and False: # control flow not good enough yet - assigned = entry.scope.control_flow.get_state((entry.name, 'initalized'), self.pos) + assigned = entry.scope.control_flow.get_state((entry.name, 'initialized'), self.pos) if assigned is False: error(self.pos, "local variable '%s' referenced before assignment" % entry.name) elif not Options.init_local_none and assigned is None: code.putln('if (%s == 0) { PyErr_SetString(PyExc_UnboundLocalError, "%s"); %s }' % (entry.cname, entry.name, code.error_goto(self.pos))) - entry.scope.control_flow.set_state(self.pos, (entry.name, 'initalized'), True) + entry.scope.control_flow.set_state(self.pos, (entry.name, 'initialized'), True) def generate_assignment_code(self, rhs, code): #print "NameNode.generate_assignment_code:", self.name ### @@ -1364,10 +1364,10 @@ class NameNode(AtomicExprNode): code.put_gotref(self.py_result()) if self.use_managed_ref and not self.lhs_of_first_assignment: if entry.is_local and not Options.init_local_none: - initalized = entry.scope.control_flow.get_state((entry.name, 'initalized'), self.pos) - if initalized is True: + initialized = entry.scope.control_flow.get_state((entry.name, 'initialized'), self.pos) + if initialized is True: code.put_decref(self.result(), self.ctype()) - elif initalized is None: + elif initialized is None: code.put_xdecref(self.result(), self.ctype()) else: code.put_decref(self.result(), self.ctype()) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 13a1fede..7c5927e7 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -1229,7 +1229,7 @@ class FuncDefNode(StatNode, BlockNode): code.put_label(code.return_from_error_cleanup_label) if not Options.init_local_none: for entry in lenv.var_entries: - if lenv.control_flow.get_state((entry.name, 'initalized')) is not True: + if lenv.control_flow.get_state((entry.name, 'initialized')) is not True: entry.xdecref_cleanup = 1 for entry in lenv.var_entries: @@ -1875,7 +1875,7 @@ class DefNode(FuncDefNode): error(arg.pos, "Missing argument name") else: env.control_flow.set_state((), (arg.name, 'source'), 'arg') - env.control_flow.set_state((), (arg.name, 'initalized'), True) + env.control_flow.set_state((), (arg.name, 'initialized'), True) if arg.needs_conversion: arg.entry = env.declare_var(arg.name, arg.type, arg.pos) if arg.type.is_pyobject: @@ -1901,7 +1901,7 @@ class DefNode(FuncDefNode): entry.init_to_none = 0 entry.xdecref_cleanup = 1 arg.entry = entry - env.control_flow.set_state((), (arg.name, 'initalized'), True) + env.control_flow.set_state((), (arg.name, 'initialized'), True) def analyse_expressions(self, env): self.local_scope.directives = env.directives diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index d744b11b..7ad57ab1 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -428,7 +428,7 @@ class Scope(object): cname = self.mangle(Naming.var_prefix, name) entry = self.declare(name, cname, type, pos, visibility) entry.is_variable = 1 - self.control_flow.set_state((), (name, 'initalized'), False) + self.control_flow.set_state((), (name, 'initialized'), False) return entry def declare_builtin(self, name, pos): -- 2.26.2