Skip to content

Comments

fix: float arguments in host function parameters#39

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

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

Conversation

@regisb
Copy link
Contributor

@regisb regisb commented Feb 9, 2026

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
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
Copy link
Contributor Author

regisb commented Feb 23, 2026

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
Member

Thank you! Will cut a release later today.

@nilslice nilslice merged commit c4c03cb into extism:main Feb 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants