Please don't add more types like the ones below. Win32 API uses that for 
HANDLE and it's a known source of really obscure and silly bugs. Examples:

        u_mutex mtx = u_mutex_new();
        u_cond cond = u_cond_new();
        u_cond_wait(mtx, &cond);

There are two bugs in the code above.

The types listed below should be changed. Meanwhile, please don't add new 
ones.

Instead, do this:

typedef struct u_mutex_internal *u_mutex;

PS: where does the "u" prefix come from?

$ git --no-pager grep 'typedef void\s*\*\s*\w' 
resource/csdk/connectivity/common/inc/umutex.h:typedef void *u_mutex;
resource/csdk/connectivity/common/inc/umutex.h:typedef void *u_cond;
resource/csdk/connectivity/common/inc/uthreadpool.h:typedef void 
*u_thread_pool_t;
resource/csdk/connectivity/lib/tizen/ble/inc/bluetooth_type.h:typedef void* 
bt_advertiser_h;
resource/csdk/connectivity/lib/tizen/ble/inc/bluetooth_type.h:typedef void* 
bt_gatt_attribute_h;
resource/csdk/connectivity/lib/tizen/ble/inc/bluetooth_type.h:typedef void* 
bt_call_list_h;
resource/csdk/stack/include/ocstack.h:typedef void * OCDoHandle;
resource/csdk/stack/include/ocstack.h:typedef void * OCResourceHandle;
resource/csdk/stack/include/ocstack.h:typedef void * OCRequestHandle;
resource/csdk/stack/include/ocstack.h:typedef void * OCResponseHandle;

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4447 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150416/9523f25b/attachment.p7s>

Reply via email to