Re: [PATCH 1/2] perf: Fix undefined PyVarObject_HEAD_INIT in python2.5

From: Ingo Molnar
Date: Sat Feb 26 2011 - 02:02:36 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> +++ b/tools/perf/util/python.c
> @@ -8,6 +8,12 @@
> #include "cpumap.h"
> #include "thread_map.h"
>
> +/* Define PyVarObject_HEAD_INIT for python 2.5 */
> +#ifndef PyVarObject_HEAD_INIT
> +#define PyVarObject_HEAD_INIT(type, size) \
> + PyObject_HEAD_INIT(type) size,
> +#endif

Just a code readability nit - there's really no reason not to write this as:

#ifndef PyVarObject_HEAD_INIT
# define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size,
#endif

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/