From 1f133813d0f3da9cab10128fc0521d62ff1eb090 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 22 Feb 2014 05:06:09 +0000 Subject: merge revision(s) r44568: [Backport #9399] * iseq.c (iseq_load): keep type_map to get rid of memory leak. based on a patch by Eric Wong at [ruby-core:59699]. [Bug #9399] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby_atomic.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ruby_atomic.h') diff --git a/ruby_atomic.h b/ruby_atomic.h index 69efbdc4c4..789efdc4ea 100644 --- a/ruby_atomic.h +++ b/ruby_atomic.h @@ -161,5 +161,10 @@ atomic_size_exchange(size_t *ptr, size_t val) # define ATOMIC_PTR_EXCHANGE(var, val) (void *)ATOMIC_SIZE_EXCHANGE(*(size_t *)&(var), (size_t)(val)) # endif #endif +#ifndef ATOMIC_PTR_CAS +# if SIZEOF_VOIDP == SIZEOF_SIZE_T +# define ATOMIC_PTR_CAS(var, oldval, val) (void *)ATOMIC_SIZE_CAS(*(size_t *)&(var), (size_t)(oldval), (size_t)(val)) +# endif +#endif #endif /* RUBY_ATOMIC_H */ -- cgit v1.2.3