Skip to content

Commit

Permalink
Allow an extension server function to return a single integer
Browse files Browse the repository at this point in the history
This is now automatically converted to a one element tuple for transport
  • Loading branch information
Araneidae committed Sep 19, 2023
1 parent 49a8896 commit c7dad83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/extension_server
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ class Extensions:
# otherwise it must be a tuple of register values to be written.
if result is None:
return ()
elif isinstance(result, int):
return (result,)
else:
return tuple(result)

Expand Down

0 comments on commit c7dad83

Please sign in to comment.