On Tue, 2007-03-06 at 00:18 -0500, Tom Lane wrote:
> Sounds like #ifdef time to me --- but it seems a bit strange; wouldn't
> the Python guys have taken a bit more care for compatibility of
> user-supplied code?
Yeah, I was a bit surprised as well. I won't claim to have any
familiarity with the Python C API, though. Py_Deprecated() is simply
defined as:
/* Py_DEPRECATED(version)* Declare a variable, type, or function deprecated.* Usage:* extern int old_var
Py_DEPRECATED(2.3);* typedef int T1 Py_DEPRECATED(2.4);* extern int x() Py_DEPRECATED(2.5);*/
#if defined(__GNUC__) && ((__GNUC__ >= 4) || \ (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
#else
#define Py_DEPRECATED(VERSION_UNUSED)
#endif
> Perhaps they provide a compatibility hack that you didn't spot?
Quite possibly. Anyone have any suggestions?
-Neil