Overview
| Artifact ID: | d6b60cc15229076988bf91bee45c09c2b264f8aa636eaced20a72106e01f5fb3 |
|---|---|
| Ticket: | 96551aca555c70e4e2157c534c8fdb11acf784e9
Avoid pointer arithmetic with NULL in FOREACH_STRUCT() |
| User & Date: | chrstphrchvz on 2023-05-08 00:35:41 |
Changes
- icomment:
<blockquote>From what I understand from the code "(ary).list" should never be NULL…</blockquote> I believe the comment for <tt>FOREACH_STRUCT()</tt> is pointing out how, unlike for the <tt>FOREACH()</tt> macro, <tt>(ary).list<b>[i]</b></tt> is never <tt>NULL</tt>; I do not think it refers to whether <tt>(ary).list</tt> is <tt>NULL</tt>. I really am not familiar with TclOO, but what I am finding is that <tt>(ary).list == NULL</tt> is valid for <tt>(ary).num == 0</tt>. The specific error at tclOOMethod.c:1108 occurs whenever a class does not have any private variables.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"