|
From: Henrik /K. <he...@ka...> - 2009-10-28 21:21:54
|
Hello Jakub! Great to see a new developer on the project! Welcome! I am by no means an authoritative source on OpenSync, but I hope my comments below will be helpful. > 1. Function [line: 164]: > static osync_bool osynctool_list_formats(OSyncFormatEnv *env, OSyncError **error) > > Argument "error" is never used in the function. Will it be needed in the future? Do we consider as a bug? > No, this is not a bug. Many functions have an OSyncError** parameter. Some time in the future the implementation may change to something which would indeed generate an error. And we could still keep the API intact. > 2. Some function return "void" and use "osync_trace", while other return "osync_bool" (and do not trace). > Are there any specific rules? When do we need trace? > "osynctool_list_formats" and "osynctool_list_plugins" seem to be very similar, but they behave differently in this matter. > In my opinion there is no relation between trace and return values. Any function which has anything interesting to say should osync_trace. Any function which could "fail" should (1) either return an osync_bool or a pointer which could be checked for NULL. (2) have an OSyncError parameter (3) set the OSyncError in case it returns false or NULL. /Henrik |