Date: Sun, 22 Mar 2009 20:52:45 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r190280 - in stable/6/sys: . contrib/pf dev/cxgb sys Message-ID: <200903222052.n2MKqjpR083178@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sun Mar 22 20:52:44 2009 New Revision: 190280 URL: http://svn.freebsd.org/changeset/base/190280 Log: MFC: r188475 o Introduce KOBJMETHOD_END for the end of the kobj list. o Fix a minor indentation problem. o Put in the extra-strict KOBJMETHOD define, but commented out since the tree isn't yet ready. Reviewed by: (1) was posted to arch@ without objection (and 1 go for it) Modified: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) stable/6/sys/sys/kobj.h Modified: stable/6/sys/sys/kobj.h ============================================================================== --- stable/6/sys/sys/kobj.h Sun Mar 22 20:52:43 2009 (r190279) +++ stable/6/sys/sys/kobj.h Sun Mar 22 20:52:44 2009 (r190280) @@ -92,7 +92,17 @@ struct kobjop_desc { /* * Shorthand for constructing method tables. */ +#if 1 #define KOBJMETHOD(NAME, FUNC) { &NAME##_desc, (kobjop_t) FUNC } +#else /* notyet */ +#define KOBJMETHOD(NAME, FUNC) \ +{ &NAME##_desc, (kobjop_t) (FUNC != (NAME##_t *)NULL ? FUNC : NULL) } +#endif + +/* + * + */ +#define KOBJMETHOD_END { NULL, NULL } /* * Declare a class (which should be defined in another file. @@ -127,7 +137,7 @@ struct kobj_class classvar = { \ base1) \ \ static kobj_class_t name ## _baseclasses[] = \ - { &base1, NULL }; \ + { &base1, NULL }; \ struct kobj_class classvar = { \ #name, methods, size, name ## _baseclasses \ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903222052.n2MKqjpR083178>