merge
authorStefan Behnel <scoder@users.berlios.de>
Fri, 17 Apr 2009 07:04:33 +0000 (09:04 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 17 Apr 2009 07:04:33 +0000 (09:04 +0200)
1  2 
Cython/Compiler/Builtin.py
Cython/Compiler/ExprNodes.py
Cython/Compiler/ModuleNode.py
Cython/Compiler/Nodes.py
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/PyrexTypes.py
Cython/Compiler/Symtab.py

Simple merge
Simple merge
Simple merge
index 89c0b3a3938266be705ed319dad2741806cfa42a,2b5cef25f28e30267302bcf05d49cfd5c72cba79..927c0eb1aee0ead6b117b1b06f7f2fe1575ab654
@@@ -883,21 -904,25 +883,22 @@@ class CEnumDefNode(StatNode)
              for item in self.items:
                  item.analyse_declarations(env, self.entry)
  
 -    def analyse_expressions(self, env):
 -        if self.visibility == 'public':
 -            self.temp = env.allocate_temp_pyobject()
 -            env.release_temp(self.temp)
 -    
      def generate_execution_code(self, code):
          if self.visibility == 'public':
 +            temp = code.funcstate.allocate_temp(PyrexTypes.py_object_type, manage_ref=True)
              for item in self.entry.enum_values:
                  code.putln("%s = PyInt_FromLong(%s); %s" % (
 -                        self.temp,
 +                        temp,
                          item.cname,
 -                        code.error_goto_if_null(self.temp, item.pos)))
 -                code.put_gotref(self.temp)
 +                        code.error_goto_if_null(temp, item.pos)))
++                code.put_gotref(temp)
                  code.putln('if (__Pyx_SetAttrString(%s, "%s", %s) < 0) %s' % (
                          Naming.module_cname, 
                          item.name, 
 -                        self.temp,
 +                        temp,
                          code.error_goto(item.pos)))
-                 code.putln("%s = 0;" % temp)
 -                code.put_decref_clear(self.temp, PyrexTypes.py_object_type)
++                code.put_decref_clear(temp, PyrexTypes.py_object_type)
 +            code.funcstate.release_temp(temp)
  
  
  class CEnumDefItemNode(StatNode):
@@@ -2705,6 -2747,11 +2704,7 @@@ class PropertyNode(StatNode)
      def analyse_declarations(self, env):
          entry = env.declare_property(self.name, self.doc, self.pos)
          if entry:
 -            if self.doc and Options.docstrings:
 -                doc_entry = env.get_string_const(
 -                    self.doc, identifier = False)
 -                entry.doc_cname = doc_entry.cname
+             entry.scope.directives = env.directives
              self.body.analyse_declarations(entry.scope)
  
      def analyse_expressions(self, env):
Simple merge
index 0b6bfcbb7e14068172d54a2c59b78e16cf580791,ff6db3b1f7dcee9a74db60c8f426bb763d6de84d..65936204f7b6ade3989dac89dff2d3aa79d3194a
@@@ -208,8 -211,9 +208,7 @@@ class Scope(object)
      scope_prefix = ""
      in_cinclude = 0
      nogil = 0
-     directives = {}
      
 -    temp_prefix = Naming.pyrex_prefix
 -    
      def __init__(self, name, outer_scope, parent_scope):
          # The outer_scope is the next scope in the lookup chain.
          # The parent_scope is used to derive the qualified name of this scope.