mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 08:22:16 +01:00 
			
		
		
		
	Merge branch 'backport-1218-hashtable-printer-glib-2-62' into 'glib-2-62'
Backport !1218 “gdb: Fix GHashTable pretty printer off-by-one error” See merge request GNOME/glib!1219
This commit is contained in:
		| @@ -124,7 +124,6 @@ class GHashPrinter: | ||||
|                 self.value = None | ||||
|                 return v | ||||
|             while long(self.pos) < long(self.size): | ||||
|                 self.pos = self.pos + 1 | ||||
|                 if long (self.hashes[self.pos]) >= 2: | ||||
|                     key = self.keys[self.pos] | ||||
|                     val = self.values[self.pos] | ||||
| @@ -135,8 +134,12 @@ class GHashPrinter: | ||||
|                     # Queue value for next result | ||||
|                     self.value = ('[%dv]'% (self.pos), val) | ||||
|  | ||||
|                     # Return key | ||||
|                     return ('[%dk]'% (self.pos), key) | ||||
|                     # Increment pos and return key | ||||
|                     key = ('[%dk]'% (self.pos), key) | ||||
|                     self.pos += 1 | ||||
|                     return key | ||||
|  | ||||
|                 self.pos += 1 | ||||
|             raise StopIteration | ||||
|  | ||||
|         __next__ = next | ||||
|   | ||||
		Reference in New Issue
	
	Block a user