Tarantool development patches archive
 help / color / mirror / Atom feed
From: Safin Timur via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	Mergen Imeev <imeevma@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: define format of ephemeral spaces
Date: Thu, 12 Aug 2021 21:56:42 +0300	[thread overview]
Message-ID: <8928b369-4cff-0913-f691-7dfa9fda79d4@tarantool.org> (raw)
In-Reply-To: <eb7b1349-3bfc-e53d-9d98-c71dfe4a547a@tarantool.org>


On 12.08.2021 21:32, Vladislav Shpilevoy via Tarantool-patches wrote:
> Hi! Thanks for the fixes!
> 
> See 7 comments below.
> 
>> -		if (def != NULL && i < def->part_count) {
>> -			assert(def->parts[i].type < field_type_MAX);
>> -			field->type = def->parts[i].type;
>> -			field->coll_id = def->parts[i].coll_id;
>> -		} else {
>> -			field->coll_id = COLL_NONE;
>> -			field->type = FIELD_TYPE_SCALAR;
>> -		}
>> +	struct key_part_def *parts = (void *)fields + parts_indent;
> 
> 2. Are you sure void * + integer works bytewise? Shouldn't it be
> cast to char * to move the pointer? In other places you use char *.

Good point. Such void pointer arithmetic is gcc specific language 
extension (https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html), and 
is not a standard approach.

Timur

  reply	other threads:[~2021-08-12 18:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 14:14 Mergen Imeev via Tarantool-patches
2021-07-23 23:06 ` Vladislav Shpilevoy via Tarantool-patches
2021-08-10 14:32   ` Mergen Imeev via Tarantool-patches
2021-08-12 18:32     ` Vladislav Shpilevoy via Tarantool-patches
2021-08-12 18:56       ` Safin Timur via Tarantool-patches [this message]
2021-08-12 21:49       ` Mergen Imeev via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8928b369-4cff-0913-f691-7dfa9fda79d4@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tsafin@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1 1/1] sql: define format of ephemeral spaces' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox