From 9b89888ddafcfd8f13f3f7535ce1744e005bac3b Mon Sep 17 00:00:00 2001 From: kosaki Date: Fri, 3 May 2013 21:03:58 +0000 Subject: * include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): New for attribute((alloc_size(params))). * include/ruby/defines.h (xmalloc, xmalloc2, xcalloc) (xrealloc, xrealloc2): Annotated by RUBY_ATTR_ALLOC_SIZE. * include/ruby/ruby.h (rb_alloc_tmp_buffer): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 43c5de6057..c01242e274 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1210,7 +1210,7 @@ rb_num2char_inline(VALUE x) #define ALLOCA_N(type,n) ((type*)alloca(sizeof(type)*(n))) -void *rb_alloc_tmp_buffer(volatile VALUE *store, long len); +void *rb_alloc_tmp_buffer(volatile VALUE *store, long len) RUBY_ATTR_ALLOC_SIZE((2)); void rb_free_tmp_buffer(volatile VALUE *store); /* allocates _n_ bytes temporary buffer and stores VALUE including it * in _v_. _n_ may be evaluated twice. */ -- cgit v1.2.3