Skip to content

fix: float arguments in host function parameters#39

Merged
nilslice merged 1 commit into
extism:mainfrom
regisb:regisb/fix-float-host-fn-args
Feb 23, 2026
Merged

fix: float arguments in host function parameters#39
nilslice merged 1 commit into
extism:mainfrom
regisb:regisb/fix-float-host-fn-args

Conversation

@regisb

@regisb regisb commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

There was a small typo in _convert_value which logged an error whenever a host function with float argument was called:

Exception ignored from cffi callback <function handle_args at 0x7fee3735b480>:
Traceback (most recent call last):
  File ".../extism/extism.py", line 908, in handle_args
    inp.append(_convert_value(inputs[i]))
  File ".../extism/extism.py", line 648, in _convert_value
    elif x.y == 3:
AttributeError: cdata 'ExtismVal' has no field 'y'
@nilslice

Copy link
Copy Markdown
Member

@regisb sorry for the delay on this, looks like a test is failing due to a linter issue.

If you don't mind, would you take a look & patch this up?

@regisb regisb force-pushed the regisb/fix-float-host-fn-args branch from 15be869 to d314c48 Compare February 23, 2026 13:55
There was a small typo in _convert_value which logged an error whenever
a host function with float argument was called:

    Exception ignored from cffi callback <function handle_args at 0x7fee3735b480>:
    Traceback (most recent call last):
      File ".../extism/extism.py", line 908, in handle_args
        inp.append(_convert_value(inputs[i]))
      File ".../extism/extism.py", line 648, in _convert_value
        elif x.y == 3:
    AttributeError: cdata 'ExtismVal' has no field 'y'
@regisb

regisb commented Feb 23, 2026

Copy link
Copy Markdown
Contributor Author

Sure thing, my bad! I should have run the test suite locally.

@regisb regisb force-pushed the regisb/fix-float-host-fn-args branch from d314c48 to 3efe901 Compare February 23, 2026 13:57
@nilslice

Copy link
Copy Markdown
Member

Thank you! Will cut a release later today.

@nilslice nilslice merged commit c4c03cb into extism:main Feb 23, 2026
6 checks passed
@regisb regisb deleted the regisb/fix-float-host-fn-args branch March 17, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants