Skip to content

Commit

Permalink
FEAT: allow block! as an argument for REGISTER-CODEC function
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Sep 19, 2018
1 parent efd3c74 commit f3e243b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mezz/sys-codec.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ REBOL [

register-codec: function [
{Registers non-native codec to system/codecs and it's suffixes into system/options/file-types}
codec [object!] "Codec to register (should be based on system/standard/codec template)"
codec [block! object!] "Codec to register (should be based on system/standard/codec template)"
/local name suffixes
][
if block? codec [codec: make object! codec]
if not word? name: try [codec/name][
cause-error 'Script 'wrong-type 'codec/name
]
Expand Down

0 comments on commit f3e243b

Please sign in to comment.