Next in thread → Next in month →

Re: [pkcs11] Proposal: All constants should have UL suffix

From
Stef Walter <>
Date
2013-06-12T17:16:53+00:00
ID
Thread
Re: [pkcs11] Proposal: All constants should have UL suffix
On 12.06.2013 18:54, Wan-Teh Chang wrote:
> On Tue, May 28, 2013 at 2:12 AM, Stef Walter <> wrote:
>> All numeric constants in the specification section "A. Manifest
>> Constants" should have the suffix 'UL' on them. This allows the code
>> like this to return the correct result:

<snip>

> Hi Stef,
> 
> I think this proposal is a fine idea. To help us review this proposal,
> you need to point out that the manifest constants in question are all
> intended for types defined as CK_ULONG. For example, CKO_DATA,
> CKO_CERTIFICATE, etc. are for the CK_OBJECT_CLASS type, which is
> defined as CK_ULONG.
> 
> This fact was not evident to me (although I suspected it is true), so
> I had to check the type definitions to convince myself.
> 
> A near counter example is the manifest constants CK_TRUE and CK_FALSE,
> which I believe are intended for the CK_BBOOL type, but CK_BBOOL is
> not defined as CK_ULONG. Since CK_TRUE and CK_FALSE are not listed in
> the specification section "A. Manifest Constants", your proposal is
> still accurate, but if you can provide such additional information,
> it'll make the review easier.

Indeed. Thanks for the keen eye. I'll clarify that.

Cheers,

Stef
Next in thread → Next in month →