X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=README.Coding;h=0bbba9fc45e5fd756ff2b77df54e86a0cebeb607;hb=fbf5f0f1cb13bdf6bf6f6c677bbbc64680711f6e;hp=956a733a4ce77e7d4b7dd4ceec0dd6449bc3a323;hpb=be300b0588729c3c87f765e2737ebaccc0af02ff;p=obnox%2Fsamba%2Fsamba-obnox.git diff --git a/README.Coding b/README.Coding index 956a733a4ce..0bbba9fc45e 100644 --- a/README.Coding +++ b/README.Coding @@ -26,9 +26,6 @@ http://www.python.org/pep/pep8 (with spaces). If you have ever worked on another free software Python project, you are probably already familiar with it. -We try to stay compatible with Python 2.4, so please don't rely on any -features that were introduced later, such as the "with" statement. - But to save you the trouble of reading the Linux kernel style guide, here are the highlights. @@ -377,3 +374,17 @@ do not use them in new code. The only exception is the test code that depends repeated use of calls like CHECK_STATUS, CHECK_VAL and others. + + +Function names in DEBUG statements +---------------------------------- + +Many DEBUG statements contain the name of the function they appear in. This is +not a good idea, as this is prone to bitrot. Function names change, code +moves, but the DEBUG statements are not adapted. Use %s and __func__ for this: + +Bad Example: + DEBUG(0, ("strstr_m: src malloc fail\n")); + +Good Example: + DEBUG(0, ("%s: src malloc fail\n", __func__));