initalized -> initialized
authorCraig Citro <craigcitro@gmail.com>
Thu, 7 Jan 2010 18:28:31 +0000 (10:28 -0800)
committerCraig Citro <craigcitro@gmail.com>
Thu, 7 Jan 2010 18:28:31 +0000 (10:28 -0800)
Cython/Compiler/ExprNodes.py
Cython/Compiler/Nodes.py
Cython/Compiler/Symtab.py

index 22a4092d4cd869a733dda82c3e267d36f76eb132..2168b442f731ed7786d37bed9953d8beddb0786a 100644 (file)
@@ -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())
index 13a1fedea6d89f0e0a90756658475ba8e81020c2..7c5927e7aa5687644bff64727e511765ce2d0492 100644 (file)
@@ -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
index d744b11b554df43f48bd2e1e325c52d2dcaf6ece..7ad57ab11a139f805761e8e957c350b8e221d761 100644 (file)
@@ -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):