Skip to content

Commit 1248478

Browse files
committed
binascii: drive the nine keyword-accepting functions off the marker ABI
Register b2a_hex/hexlify, a2b_qp/b2a_qp, and a2b_base64/b2a_base64/b2a_uu through the inline_functions: arm so #[pyre_function] derives their Signature and the caller binds keywords into positional slots. Register the all-positional-only crc32/crc_hqx through a hand-built SignatureBuilder (marker_posonly after every append) in extra_init:, since #[posonly] on a parameter cannot mark a run with no trailing parameter. Both take HOPELESS arity so the positional path routes through the binder rather than the fixed-arity fast entry. The bodies read PY_NULL-padded positional slots instead of peeling split_builtin_kwargs / bind_builtin_kwargs; the two helpers and the marker producer stay for the remaining null-sig callers. crc32/crc_hqx report keyword and arity errors under the bare function name (crc32() ...) the way funcrun_obj names an interp2app function, dropping the manual binascii. prefix. a2b_base64's strict_mode stays keyword-only, unchanged; interp_base64.py marks no __kwonly__ there, so upstream keeps it positional-or-keyword. Assisted-by: Claude
1 parent e7273b0 commit 1248478

1 file changed

Lines changed: 208 additions & 158 deletions

File tree

  • pyre/pyre-interpreter/src/module/binascii

0 commit comments

Comments
 (0)