Kristoffer Gronlund 2019-08-01 13:46:20 +00:00 committed by Git OBS Bridge
parent 844c917c04
commit f7af936f58

View File

@ -1,26 +0,0 @@
From 80f84f2132233f8bcba05273cc23414caff8bd9c Mon Sep 17 00:00:00 2001
From: Matthew Flatt <mflatt@racket-lang.org>
Date: Sat, 2 Feb 2019 19:38:41 -0700
Subject: [PATCH] fix extflvector-length for platforms where it's not inlined
---
racket/src/racket/src/number.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/racket/src/racket/src/number.c b/racket/src/racket/src/number.c
index 954efffbf1..e486ce265d 100644
--- a/racket/src/racket/src/number.c
+++ b/racket/src/racket/src/number.c
@@ -1083,7 +1083,11 @@ void scheme_init_extfl_number(Scheme_Startup_Env *env)
ADD_PRIM_W_ARITY("make-shared-extflvector", make_shared_extflvector, 1, 2, env);
p = scheme_make_immed_prim(extflvector_length, "extflvector-length", 1, 1);
- SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(SCHEME_PRIM_IS_UNARY_INLINED
+ if (MZ_LONG_DOUBLE_AVAIL_AND(1))
+ flags = SCHEME_PRIM_IS_BINARY_INLINED;
+ else
+ flags = SCHEME_PRIM_SOMETIMES_INLINED;
+ SCHEME_PRIM_PROC_FLAGS(p) |= scheme_intern_prim_opt_flags(flags
| SCHEME_PRIM_PRODUCES_FIXNUM);
scheme_addto_prim_instance("extflvector-length", p, env);