From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 4 Apr 2019 18:42:04 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v1 1/1] Implement mp_stack_top for mp_stack class Message-ID: <20190404154204.nthzbpfzw2ocek5p@esperanza> References: <316cea905dca2ac8db8b1adb9d0040a9c338dc5c.1554219130.git.kshcherbatov@tarantool.org> <20190403121202.w66dbmhr7yrr5ysd@esperanza> <4377f916-eb85-44c4-2124-cb4b14d5a6d4@tarantool.org> <20190403154003.kdpt3vgbqtch3sjg@esperanza> <62477fef-d2fc-9559-30f4-36d03a9b70db@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <62477fef-d2fc-9559-30f4-36d03a9b70db@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Wed, Apr 03, 2019 at 08:49:23PM +0300, Kirill Shcherbatov wrote: > @@ -2349,6 +2337,12 @@ mp_stack_is_full(struct mp_stack *stack) > return stack->used >= stack->size; > } > > +MP_IMPL struct mp_frame * > +mp_stack_top(struct mp_stack *stack) > +{ Nit: assert(!mp_stack_is_empty(stack)); > + return &stack->frames[stack->used - 1]; > +} Other than that, the patch looks good, BUT for some reason it doesn't compile on CentOS 6 on Travis, see https://travis-ci.org/tarantool/msgpuck/jobs/515314874 It fails with BFD: /build/BUILDROOT/msgpuck-2.0.23-1.el6.x86_64/usr/lib64/libmsgpuck.a(msgpuck.c.o): invalid relocation type 42 Please figure out why is that and fix if possible.