-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I am OK with this patch in principle if you believe that it is an improvement. It reduces the code size, but on the other hand it means that you're having tiny allocations for DWORDs and GUIDs. Keep in mind that such allocations mean overhead in memory use, run time and memory fragmentation.
I'd like to point out an alternative approach: You can give struct component a variable size, similar to how struct wined3d_private_data in include/wine/wined3d.h works.
But overall I think this is a minor detail considering the overall state of the directplay libs and that there are more important issues to solve. I don't want to stand in your way by arguing about small things like this. I can't promise Alexandre agrees though.
Either way, two style comments: The test is a good test to add, but should be in its own patch.
Am 2015-06-10 um 06:41 schrieb Alistair Leslie-Hughes:
found = TRUE;
if(entry->type == DPNA_DATATYPE_STRING_ANSI)
heap_free(entry->data.ansi);
else if(entry->type == DPNA_DATATYPE_STRING)
heap_free(entry->data.string);
else if(entry->type == DPNA_DATATYPE_BINARY)
heap_free(entry->data.binary);
heap_free(entry->data); break;
The added heap_free line is indented by 11 chars.
Cheers, Stefan