Skip to content

Commit

Permalink
FIX: allow use of any function type for codec's encode/decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jun 3, 2024
1 parent e0b1635 commit e52542b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mezz/sys-codec.reb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ decode: function [
; original codecs were only natives
do-codec cod/entry 'decode data
][
either function? try [:cod/decode][
either any-function? try [:cod/decode][
cod/decode data
][
cause-error 'internal 'not-done type
Expand Down Expand Up @@ -75,7 +75,7 @@ encode: function [
]
do-codec cod/entry 'encode data
][
either function? try [:cod/encode][
either any-function? try [:cod/encode][
;@@ cannot use dynamic refinement, because some codecs don't have /as
either as [
cod/encode/as :data :options
Expand Down

0 comments on commit e52542b

Please sign in to comment.