Skip to content

[core] Provide TParameter dictionaries for all arithmetic types - #23613

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:tparameter-missing-dictionaries
Oct 8, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:tparameter-missing-dictionaries

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

Instantiating TParameter for a type without a dictionary (e.g. char) from the interpreter failed with unresolved symbols:

IncrementalExecutor::executeFunction: symbol
'_ZN10TParameterIcE5ClassEv' unresolved while linking symbol!

IncrementalExecutor::executeFunction: symbol
'_ZN10TParameterIcE8StreamerER7TBuffer' unresolved while linking
symbol!

because the interpreter-emitted vtable references the ClassDef-declared Class() and Streamer() members, which are only defined by dictionaries, and only Bool_t, Float_t, Double_t, Int_t, Long_t and Long64_t had one in LinkDef3.h. Add the remaining standard arithmetic types (Char_t, UChar_t, Short_t, UShort_t, UInt_t, ULong_t and ULong64_t).

Also restore the default "Option_t * = """ argument on the TParameter overrides of TObject::Print() and TObject::ls(), so that they are callable without arguments through a TParameter*-typed reference (in particular from Python, as in the reproducer of the original report).

Fixes #10724

🤖 Done with the help of AI

Comment thread bindings/pyroot/pythonizations/test/misc_pyz.py Outdated
Instantiating TParameter<T> for a type without a dictionary (e.g. char)
from the interpreter failed with unresolved symbols:

  IncrementalExecutor::executeFunction: symbol
  '_ZN10TParameterIcE5ClassEv' unresolved while linking symbol!

  IncrementalExecutor::executeFunction: symbol
  '_ZN10TParameterIcE8StreamerER7TBuffer' unresolved while linking
  symbol!

because the interpreter-emitted vtable references the ClassDef-declared
Class() and Streamer() members, which are only defined by dictionaries,
and only Bool_t, Float_t, Double_t, Int_t, Long_t and Long64_t had one
in LinkDef3.h. Add the remaining standard arithmetic types (Char_t,
signed char, UChar_t, Short_t, UShort_t, UInt_t, ULong_t and ULong64_t).
signed char is a type distinct from char, and is what std::int8_t
aliases.

Also restore the default `Option_t * = ""` argument on the TParameter
overrides of TObject::Print() and TObject::ls(), so that they are
callable without arguments through a TParameter<T>*-typed reference (in
particular from Python, as in the reproducer of the original report).

Fixes root-project#10724

🤖 Done with the help of AI
@guitargeek
guitargeek force-pushed the tparameter-missing-dictionaries branch from d3d4935 to eeb15c6 Compare October 7, 2026 11:02
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 1h 17m 59s ⏱️
 3 885 tests  3 882 ✅ 0 💤 3 ❌
83 157 runs  83 154 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit eeb15c6.

♻️ This comment has been updated with latest results.

@pcanal

pcanal commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Fixes #10724

It is not clear this PR (which has its own Intrinsic value) actually fixes the issue (where TParameter may just have been an example). (It appears that things moved around such that not having the TParameter dictionary changed its consequence from triggering the origin issue 10724 to the missing symbols - so it is unclear if we still have a known way to trigger the original problem).

@guitargeek

Copy link
Copy Markdown
Contributor Author

The original #10724 was about cppyy evaluating each enumerator of a class template via ProcessLine("TParameter<char>::kMultiply;") in GetDatamemberOffset. That code path survived unchanged until the CppInterOp migration. The missing-symbol error is indeed a separate, coexisting problem from constructing TParameter<char> without a dictionary, which is what this PR fixes. So this should say "Related to", and #10724 can be closed referencing #21261. There's no test asserting the original problem yet, but I'll write one on the CppInterOp/cppjit side.

@guitargeek
guitargeek merged commit 3ed8c2b into root-project:master Oct 8, 2026
68 of 90 checks passed
@guitargeek
guitargeek deleted the tparameter-missing-dictionaries branch October 8, 2026 10:16
@pcanal

pcanal commented Oct 8, 2026

Copy link
Copy Markdown
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PyROOT / cppyy: potentially ineffcicient "member offset" on enumerators

3 participants