1. Pypy
  2. Untitled project
  3. jitviewer

Commits

Maciej Fijalkowski  committed 397c89a

fix for not dotted names

  • Participants
  • Parent commits f5e4b36
  • Branches default

Comments (0)

Files changed (1)

File loops.py

View file
 
     def repr_getfield_gc(self):
         fullname, field = self.descr.split(' ')[1].rsplit('.', 1)
-        namespace, classname = fullname.rsplit('.', 1)
+        names = fullname.rsplit('.', 1)
+        if len(names) == 2:
+            namespace, classname = names
+        else:
+            namespace = ''
+            classname = names[0]
         namespace = cssclass('namespace', namespace)
         classname = cssclass('classname', classname)
         field = cssclass('fieldname', field)
+            
         obj = self.getarg(0)
         return '%s = ((%s.%s)%s).%s' % (self.getres(), namespace, classname, obj, field)
     repr_getfield_gc_pure = repr_getfield_gc