[vim/vim] Use struct string_T to store field class_name in struct class_T (PR #18925)

10 views
Skip to first unread message

John Marriott

unread,
Dec 14, 2025, 5:21:34 PM (2 days ago) Dec 14
to vim/vim, Subscribed

Use struct string_T to store field class_name in struct class_T.

This means we can just use the .length field in struct string_T instead of measuring it.

In addition:

  1. In eval.c use string_T to store class_name and s in function class_tv2string().
  2. In vim9type.c change some calls from ga_concat() to ga_concat_len() where the length is known.
  3. In vim9class.c remove unused struct definition oc_newmember_S.
    Change some calls from ga_concat() to ga_concat_len() where the length is known.
  4. In scriptfile.c use string_T to store type_name, class_name and es_name in function estack_sfile().
    In function estack_sfile() simplify construction of the grow array ga to make it more closely match how .
    Change some calls from ga_concat() to ga_concat_len() where the length is known.

Cheers
John


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/18925

Commit Summary

  • 19843db Use struct string_T to store field class_name in struct class_T

File Changes

(12 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18925@github.com>

John Marriott

unread,
Dec 14, 2025, 7:04:05 PM (2 days ago) Dec 14
to vim/vim, Push

@basilisk0315 pushed 1 commit.

  • 20b6907 Fix to reference the struct field


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18925/before/19843db77595e1f132f8f976b0b211098fd7d2a1/after/20b69073141ffcc800c5e3bb3d579cfc0b068d31@github.com>

Christian Brabandt

unread,
Dec 15, 2025, 3:07:52 PM (yesterday) Dec 15
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18925)

thanks, I think this is a nice change.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18925/c3657383975@github.com>

Christian Brabandt

unread,
Dec 15, 2025, 3:21:36 PM (yesterday) Dec 15
to vim/vim, Subscribed

Closed #18925 via 2019321.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18925/issue_event/21575897160@github.com>

Reply all
Reply to author
Forward
0 new messages