RE: updated headers - SceMiRecoverableError revoked, please super ceed

From: Bojsen, Per <bojsen@zaiqtech.com>
Date: Thu Jul 15 2004 - 10:21:38 PDT

Hi John,

I reviewed the C++ header and had a few comments:

1) The #define's for SCEMI_(MAJOR|MINOR|PATCH)_VERSION and
   SCEMI_VERSION_STRING's that we agreed to a long time ago
   are missing.

2) The file is #include'ing <stdlib.h>. I assume that is to
   get NULL? It might be nice to add a comment to that effect
   and to use the C++'ified <cstdlib> header instead. In
   any event, #include'ing <stdlib.h> is not mandated, right?
   It is meant to be an example?

3) Should we add comments to the typedef's for SceMiU32 and
   SceMiU64 that they are examples and not mandated? The
   typedef for SceMiU32 might actually define a 64-bit unsigned
   integer on a 64-bit platform depending on the compiler,
   compiler flags, etc. It is a shame that <cstddef> is not
   universally available or we could have based these types on
   uint32_t and uint64_t.

4) There is an inconsistency in how callbacks are defined. The
   error and info handler types are defined with C linkage, but
   all other callback types are defined with C++ linkage. I
   think we should be consistent. If all callbacks are defined
   with C linkage, then C callback functions can be used and
   C and C++ SCE-MI code can be mixed more freely. On the
   other hand, C linkage prevents static member functions from
   being used as callbacks. Personally, I don't currently see
   mixing of C and C++ SCE-MI code as a big issue and I would
   favor that all callbacks in the C++ API have C++ linkage.

5) There is a lot of #ifdef __cplusplus code. This is redundant
   because we know this is C++ code. On the same note, we can
   remove the definition of bool.

Some nits:

6) The assigments of the enum values in the definitions of
   SceMiErrorType and SceMiInfoType are redundant and not in
   the spec.

7) The name of the first argument of the SceMiParameters constructor
   is `paramsFile' in the spec but `paramfile' in the header.

8) The default value for the SceMiEC * parameter of NumberOfObjects()
   is `NULL' in the spec but `0' in the header. I know, these are
   supposed to be the same, but some users might get confused.

9) The PortWidth() methods return `unsigned' in the spec but
   `const unsigned' in the header file. Making integer return types
   const does not make much sense to me.

10) Most methods in SceMiMessageData have `unsigned int' replaced
    with `unsigned' in the header file.

I think the biggest issue is the missing #define's and what to do with
the function pointer types re C versus C++ linkage.

Per
Received on Thu Jul 15 10:21:24 2004

This archive was generated by hypermail 2.1.8 : Thu Jul 15 2004 - 10:21:51 PDT