mirror of
https://github.com/janet-lang/janet
synced 2024-12-27 00:40:26 +00:00
Merge pull request #740 from yumaikas/hotfix-new-style-math-bindings
Fix macro stringification for one-arg math functions
This commit is contained in:
commit
28fb76e602
@ -256,7 +256,7 @@ JANET_CORE_FN(janet_srand,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define JANET_DEFINE_MATHOP(name, fop, doc)\
|
#define JANET_DEFINE_MATHOP(name, fop, doc)\
|
||||||
JANET_CORE_FN(janet_##name, "(math/##name x)", doc) {\
|
JANET_CORE_FN(janet_##name, "(math/" #name " x)", doc) {\
|
||||||
janet_fixarity(argc, 1); \
|
janet_fixarity(argc, 1); \
|
||||||
double x = janet_getnumber(argv, 0); \
|
double x = janet_getnumber(argv, 0); \
|
||||||
return janet_wrap_number(fop(x)); \
|
return janet_wrap_number(fop(x)); \
|
||||||
|
Loading…
Reference in New Issue
Block a user