Hello All, I'm proposing we remove all the EINA_ARG_NOTNULLs floating around in public headers. In short they may generate a warning, but they subvert any checks we have in the API, and can cause valid code to break.
The not null macro expands to the GCC attribute "notnull". From the GCC documentation[1]: "The compiler may also choose to make optimizations based on the knowledge that certain function arguments will not be null." This means (with optimisations on) that GCC will remove any calls of the form if (arg == NULL) return err; Because you have told it that arg will NEVER be NULL. But we don't make that guarantee at all. Instead we say that people calling this function MAY get a warning if they pass a NULL pointer. So we cripple all our magic checks. Hence we really should kill the not nulls, they don't do what we want, they may give us a small performance boost, but at the unacceptably high cost of generating broken code. Regards, nash [1] http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel