sizeof(uchar**) vs sizeof(uchar*)
Posted by: qihua wu
Date: April 05, 2009 11:05PM

In the source code of mysql,
sizeof(uchar**) is used like:
recbuffer= (uint) (reclength + sizeof(uchar**) - 1) & ~(sizeof(uchar**) - 1);

sizeof(uchar*) is used like:
keyseg->length= sizeof(uchar*);

In C, the size of a pointer should be the same. So the size of pointer to a uchar should be the same as the size of a pointer to a pointer (to a uchar). In this way, sizeof(uchar*) should be the same as sizeof(uchar**). Am I right?

Options: ReplyQuote


Subject
Views
Written By
Posted
sizeof(uchar**) vs sizeof(uchar*)
1340
April 05, 2009 11:05PM
499
April 07, 2009 03:27AM
405
April 07, 2009 10:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.