summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-01 20:55:39 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-01 20:55:39 (GMT)
commit74fdf5232d3039f107ebaf98486e5d3c79087478 (patch)
treef04b0e84d8926d600393b7af203fc0f47f977fad /cont.c
parent45255c4233e2cdc58045281fe778cc016adb2119 (diff)
cont.c: cleanup needless cast
It seems like leftover development step from r59557 ("refactoring Fiber status"). I will make fiber_status use BITFIELD macro in a future commit. * cont.c (struct rb_fiber_struct): drop const from fiber_status (fiber_status_set): remove cast [ruby-core:86788] [Misc #14720] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cont.c b/cont.c
index e4fe644..5171b28 100644
--- a/cont.c
+++ b/cont.c
@@ -156,7 +156,7 @@ struct rb_fiber_struct {
rb_context_t cont;
VALUE first_proc;
struct rb_fiber_struct *prev;
- const enum fiber_status status;
+ enum fiber_status status;
/* If a fiber invokes "transfer",
* then this fiber can't "resume" any more after that.
* You shouldn't mix "transfer" and "resume".
@@ -223,13 +223,13 @@ rb_ec_verify(const rb_execution_context_t *ec)
#endif
static void
-fiber_status_set(const rb_fiber_t *fib, enum fiber_status s)
+fiber_status_set(rb_fiber_t *fib, enum fiber_status s)
{
if (0) fprintf(stderr, "fib: %p, status: %s -> %s\n", (void *)fib, fiber_status_name(fib->status), fiber_status_name(s));
VM_ASSERT(!FIBER_TERMINATED_P(fib));
VM_ASSERT(fib->status != s);
fiber_verify(fib);
- *((enum fiber_status *)&fib->status) = s;
+ fib->status = s;
}
void