diff options
author | Régis Duchesne <hpreg@vmware.com> | 2006-06-06 20:05:53 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2006-06-06 20:05:53 +0000 |
commit | 4cd489b9ca521fc864f26c3b813bd0a4e2bf62e9 (patch) | |
tree | 29e5b97379c1f5656a4401478c22a8367d973c2a | |
parent | c9886ff0a2d8be6006218a49a6c42f9c30ff0c29 (diff) | |
download | sigc++-4cd489b9ca521fc864f26c3b813bd0a4e2bf62e9.tar.gz |
Renamed 'nil' to 'none' to allow an Objective-C++ compiler to compile the
2006-05-26 Régis Duchesne <hpreg@vmware.com>
* sigc++/adaptors/macros/bind.h.m4:
* sigc++/adaptors/macros/retype.h.m4:
* sigc++/functors/macros/functor_trait.h.m4:
* sigc++/functors/macros/slot.h.m4:
* sigc++/macros/retype.h.m4:
* sigc++/macros/signal.h.m4:
Renamed 'nil' to 'none' to allow an Objective-C++ compiler to compile
the library header files.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | sigc++/adaptors/macros/bind.h.m4 | 6 | ||||
-rw-r--r-- | sigc++/adaptors/macros/retype.h.m4 | 2 | ||||
-rw-r--r-- | sigc++/functors/macros/functor_trait.h.m4 | 17 | ||||
-rw-r--r-- | sigc++/functors/macros/slot.h.m4 | 10 | ||||
-rw-r--r-- | sigc++/macros/retype.h.m4 | 2 | ||||
-rw-r--r-- | sigc++/macros/signal.h.m4 | 30 |
7 files changed, 50 insertions, 28 deletions
@@ -1,3 +1,14 @@ +2006-05-26 Régis Duchesne <hpreg@vmware.com> + + * sigc++/adaptors/macros/bind.h.m4: + * sigc++/adaptors/macros/retype.h.m4: + * sigc++/functors/macros/functor_trait.h.m4: + * sigc++/functors/macros/slot.h.m4: + * sigc++/macros/retype.h.m4: + * sigc++/macros/signal.h.m4: + Renamed 'nil' to 'none' to allow an Objective-C++ compiler to compile + the library header files. + 2.0.17: 2005-12-20 Murray Cumming <murrayc@murrayc.com> diff --git a/sigc++/adaptors/macros/bind.h.m4 b/sigc++/adaptors/macros/bind.h.m4 index c38e6fa..0b83d0b 100644 --- a/sigc++/adaptors/macros/bind.h.m4 +++ b/sigc++/adaptors/macros/bind.h.m4 @@ -80,7 +80,7 @@ define([BIND_FUNCTOR_LOCATION],[dnl * @ingroup bind */ template <class T_functor, class T_bound> -struct bind_functor<$1, T_functor, T_bound, LIST(LOOP(nil, CALL_SIZE - 1))> : public adapts<T_functor> +struct bind_functor<$1, T_functor, T_bound, LIST(LOOP(none, CALL_SIZE - 1))> : public adapts<T_functor> { typedef typename adapts<T_functor>::adaptor_type adaptor_type; @@ -120,7 +120,7 @@ define([BIND_FUNCTOR_COUNT],[dnl * @ingroup bind */ template <LIST(class T_functor, LOOP(class T_type%1, $1))> -struct bind_functor<LIST(-1, T_functor, LIST(LOOP(T_type%1, $1), LOOP(nil, CALL_SIZE - $1)))> : public adapts<T_functor> +struct bind_functor<LIST(-1, T_functor, LIST(LOOP(T_type%1, $1), LOOP(none, CALL_SIZE - $1)))> : public adapts<T_functor> { typedef typename adapts<T_functor>::adaptor_type adaptor_type; @@ -332,7 +332,7 @@ FOR(1, CALL_SIZE,[ * * @ingroup bind */ -template <LIST(int I_location, class T_functor, LOOP(class T_type%1=nil, CALL_SIZE))> +template <LIST(int I_location, class T_functor, LOOP(class T_type%1=none, CALL_SIZE))> struct bind_functor; FOR(0,eval(CALL_SIZE-1),[[BIND_FUNCTOR_LOCATION(%1)]])dnl diff --git a/sigc++/adaptors/macros/retype.h.m4 b/sigc++/adaptors/macros/retype.h.m4 index d0cbb17..2d9286c 100644 --- a/sigc++/adaptors/macros/retype.h.m4 +++ b/sigc++/adaptors/macros/retype.h.m4 @@ -133,7 +133,7 @@ FOR(1, CALL_SIZE,[ * * @ingroup retype */ -template <LIST(class T_functor, LOOP(class T_type%1=nil, CALL_SIZE))> +template <LIST(class T_functor, LOOP(class T_type%1=none, CALL_SIZE))> struct retype_functor : public adapts<T_functor> { diff --git a/sigc++/functors/macros/functor_trait.h.m4 b/sigc++/functors/macros/functor_trait.h.m4 index 7aef76a..7033135 100644 --- a/sigc++/functors/macros/functor_trait.h.m4 +++ b/sigc++/functors/macros/functor_trait.h.m4 @@ -77,14 +77,25 @@ __FIREWALL__ namespace sigc { -/** nil struct type. - * The nil struct type is used as default template argument in the +/** none struct type. + * The none struct type is used as default template argument in the * unnumbered sigc::signal and sigc::slot templates. * * @ingroup signal * @ingroup slot */ -struct nil; +struct none; + +/** nil type (deprecated). + * The nil type is an alias for the none struct type. It is not available when + * using an Objective-C++ compiler (because nil has a different meaning in + * Objective-C). Otherwise its use is deprecated, but it is defined so that + * source code written against libsigc++ versions <= 2.0.17 still compiles. + * @deprecated Use none instead. + */ +#ifndef __OBJC__ +typedef none nil; +#endif /** @defgroup functors Functors diff --git a/sigc++/functors/macros/slot.h.m4 b/sigc++/functors/macros/slot.h.m4 index f02041c..731b243 100644 --- a/sigc++/functors/macros/slot.h.m4 +++ b/sigc++/functors/macros/slot.h.m4 @@ -26,7 +26,7 @@ define([SLOT_N],[dnl * The template arguments determine the function signature of operator()(): * - @e T_return The return type of operator()().dnl FOR(1,$1,[ - * - @e T_arg%1 Argument type used in the definition of operator()(). The default @p nil means no argument.]) + * - @e T_arg%1 Argument type used in the definition of operator()(). The default @p none means no argument.]) * * To use simply assign the slot to the desired functor. If the functor * is not compatible with the parameter list defined with the template @@ -107,7 +107,7 @@ ifelse($1, $2,[dnl * The template arguments determine the function signature of operator()(): * - @e T_return The return type of operator()().dnl FOR(1,$1,[ - * - @e T_arg%1 Argument type used in the definition of operator()(). The default @p nil means no argument.]) + * - @e T_arg%1 Argument type used in the definition of operator()(). The default @p none means no argument.]) * * To use simply assign the slot to the desired functor. If the functor * is not compatible with the parameter list defined with the template @@ -125,18 +125,18 @@ FOR(1,$1,[ * * @ingroup slot */ -template <LIST(class T_return, LOOP(class T_arg%1 = nil, $1))>],[dnl +template <LIST(class T_return, LOOP(class T_arg%1 = none, $1))>],[dnl /** Convenience wrapper for the numbered sigc::slot$1 template. * See the base class for useful methods. * This is the template specialization of the unnumbered sigc::slot * template for $1 argument(s), specialized for different numbers of arguments - * This is possible because the template has default (nil) template types. + * This is possible because the template has default (none) template types. dnl * dnl * @ingroup slot */ template <LIST(class T_return, LOOP(class T_arg%1, $1))>]) -class slot ifelse($1, $2,,[<LIST(T_return, LIST(LOOP(T_arg%1, $1), LOOP(nil, CALL_SIZE - $1)))>]) +class slot ifelse($1, $2,,[<LIST(T_return, LIST(LOOP(T_arg%1, $1), LOOP(none, CALL_SIZE - $1)))>]) : public slot$1<LIST(T_return, LOOP(T_arg%1, $1))> { public: diff --git a/sigc++/macros/retype.h.m4 b/sigc++/macros/retype.h.m4 index 67b62bb..237fbca 100644 --- a/sigc++/macros/retype.h.m4 +++ b/sigc++/macros/retype.h.m4 @@ -77,7 +77,7 @@ __FIREWALL__ namespace SigC { -template <LIST(class T_functor, class T_return, LOOP(class T_type%1=::sigc::nil, CALL_SIZE))> +template <LIST(class T_functor, class T_return, LOOP(class T_type%1=::sigc::none, CALL_SIZE))> struct retype_slot_functor : public ::sigc::adapts<T_functor> { diff --git a/sigc++/macros/signal.h.m4 b/sigc++/macros/signal.h.m4 index dd72bd5..4f4bd4d 100644 --- a/sigc++/macros/signal.h.m4 +++ b/sigc++/macros/signal.h.m4 @@ -23,7 +23,7 @@ define([SIGNAL_EMIT_N],[dnl * This template implements the emit() function of signal$1. * Template specializations are available to optimize signal * emission when no accumulator is used, i.e. the template - * argument @e T_accumulator is @p nil. + * argument @e T_accumulator is @p none. */ template <LIST(class T_return, LOOP(class T_arg%1, $1), class T_accumulator)> struct signal_emit$1 @@ -85,9 +85,9 @@ dnl * function for the case that no accumulator is used. */ template <LIST(class T_return, LOOP(class T_arg%1, $1))> -struct signal_emit$1<LIST(T_return, LOOP(T_arg%1, $1), nil)> +struct signal_emit$1<LIST(T_return, LOOP(T_arg%1, $1), none)> { - typedef signal_emit$1<LIST(T_return, LOOP(T_arg%1, $1), nil) > self_type; + typedef signal_emit$1<LIST(T_return, LOOP(T_arg%1, $1), none) > self_type; typedef T_return result_type; typedef slot<LIST(T_return, LOOP(T_arg%1, $1))> slot_type; typedef signal_impl::const_iterator_type iterator_type; @@ -141,9 +141,9 @@ FOR(1, $1,[ * return type is @p void. */ template <LOOP(class T_arg%1, $1)> -struct signal_emit$1<LIST(void, LOOP(T_arg%1, $1), nil)> +struct signal_emit$1<LIST(void, LOOP(T_arg%1, $1), none)> { - typedef signal_emit$1<LIST(void, LOOP(T_arg%1, $1), nil)> self_type; + typedef signal_emit$1<LIST(void, LOOP(T_arg%1, $1), none)> self_type; typedef void result_type; typedef slot<LIST(void, LOOP(T_arg%1, $1))> slot_type; typedef signal_impl::const_iterator_type iterator_type; @@ -196,13 +196,13 @@ define([SIGNAL_N],[dnl * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).dnl FOR(1,$1,[ * - @e T_arg%1 Argument type used in the definition of emit().]) - * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * - @e T_accumulator The accumulator type used for emission. The default @p none means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. * * You should use the more convenient unnumbered sigc::signal template. * * @ingroup signal */ -template <LIST(class T_return, LOOP(class T_arg%1, $1), class T_accumulator=nil)> +template <LIST(class T_return, LOOP(class T_arg%1, $1), class T_accumulator=none)> class signal$1 : public signal_base { @@ -242,7 +242,7 @@ public: * During signal emission all slots that have been connected * to the signal are invoked unless they are manually set into * a blocking state. The parameters are passed on to the slots. - * If @e T_accumulated is not @p nil, an accumulator of this type + * If @e T_accumulated is not @p none, an accumulator of this type * is used to process the return values of the slot invocations. * Otherwise, the return value of the last slot invoked is returned.dnl FOR(1, $1,[ @@ -311,7 +311,7 @@ ifelse($1, $2,[dnl * the emit() function: * - @e T_return The desired return type of the emit() function.dnl FOR(1,$1,[ - * - @e T_arg%1 Argument type used in the definition of emit(). The default @p nil means no argument.]) + * - @e T_arg%1 Argument type used in the definition of emit(). The default @p none means no argument.]) * * To specify an accumulator type the nested class signal::accumulated can be used. * @@ -325,7 +325,7 @@ FOR(1,$1,[ * * @ingroup signal */ -template <LIST(class T_return, LOOP(class T_arg%1 = nil, $1))>],[dnl +template <LIST(class T_return, LOOP(class T_arg%1 = none, $1))>],[dnl /** Convenience wrapper for the numbered sigc::signal$1 template. * See the base class for useful methods. @@ -337,8 +337,8 @@ ifelse($1, $2,[dnl ])dnl */ template <LIST(class T_return, LOOP(class T_arg%1, $1))>]) -class signal ifelse($1, $2,,[<LIST(T_return, LOOP(T_arg%1,$1), LOOP(nil, CALL_SIZE - $1))>]) - : public signal$1<LIST(T_return, LOOP(T_arg%1, $1),nil)> +class signal ifelse($1, $2,,[<LIST(T_return, LOOP(T_arg%1,$1), LOOP(none, CALL_SIZE - $1))>]) + : public signal$1<LIST(T_return, LOOP(T_arg%1, $1),none)> { public: ifelse($1, $2,[dnl @@ -406,7 +406,7 @@ ifelse($1, $2,[dnl signal() {} signal(const signal& src) - : signal$1<LIST(T_return, LOOP(T_arg%1, $1),nil)>(src) {} + : signal$1<LIST(T_return, LOOP(T_arg%1, $1),none)>(src) {} }; ]) @@ -433,12 +433,12 @@ define([SIGNAL_COMPAT_N],[dnl * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).dnl FOR(1,$1,[ * - @e T_arg%1 Argument type used in the definition of emit().]) - * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked. + * - @e T_accumulator The accumulator type used for emission. The default @p none means that no accumulator should be used. Signal emission returns the return value of the last slot invoked. * * @deprecated Use the unnumbered template sigc::signal instead. * @ingroup compat */ -template <LIST(class T_return, LOOP(class T_arg%1, $1), class T_accumulator=::sigc::nil)> +template <LIST(class T_return, LOOP(class T_arg%1, $1), class T_accumulator=::sigc::none)> class Signal$1 : public ::sigc::signal$1<LIST(T_return, LOOP(T_arg%1, $1), T_accumulator)> { |