commit | c286bfe1e5c252689126cb2f45677bd36a2fdd56 | [log] [tgz] |
---|---|---|
author | Tom Tromey <tromey@adacore.com> | Tue Nov 19 07:34:26 2024 -0700 |
committer | Tom Tromey <tromey@adacore.com> | Mon Dec 09 14:17:23 2024 -0700 |
tree | e74594d70e93b7a457b0b0b1708fb7af968bb414 | |
parent | 2134b0b4a5ff493878386183dfd8a735b5334ad7 [diff] |
Clean up 0-length handling in gdbpy_create_lazy_string_object gdbpy_create_lazy_string_object will throw an exception if you pass it a NULL pointer without also setting length=0 -- the default, length==-1, will fail. This seems bizarre. Furthermore, it doesn't make sense to do this check for array types, as an array can have a zero length. This patch cleans up the check and makes it specific to TYPE_CODE_PTR.