From 97e21517a3c79b9b144b7160afd545c283815413 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 11 Mar 2015 00:20:45 +0000 Subject: * internal.h: define struct MEMO. * enum.c: use MEMO. * enumerator.c: ditto. * load.c: ditto. * node.h: return (struct MEMO *) pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index b146b46d30..0aa58439b5 100644 --- a/internal.h +++ b/internal.h @@ -596,6 +596,23 @@ CREF_OMOD_SHARED_UNSET(rb_cref_t *cref) cref->flags &= ~NODE_FL_CREF_OMOD_SHARED_; } +/* MEMO */ + +struct MEMO { + VALUE flags; + VALUE reserved; + VALUE v1; + VALUE v2; + union { + long cnt; + long state; + VALUE value; + VALUE (*func)(ANYARGS); + } u3; +}; + +#define MEMO_CAST(m) ((struct MEMO *)m) + struct vtm; /* defined by timev.h */ /* array.c */ -- cgit v1.2.3