* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* WARNING:
+ *
+ * This file is INSTALLED and other projects (outside of glib)
+ * #include its contents.
*/
#ifndef __G_OBJECT_NOTIFY_QUEUE_H__
}
pspecs = nqueue->n_pspecs > 16 ? free_me = g_new (GParamSpec*, nqueue->n_pspecs) : pspecs_mem;
- /* set first entry to NULL since it's checked unconditionally */
- pspecs[0] = NULL;
+
for (slist = nqueue->pspecs; slist; slist = slist->next)
{
- GParamSpec *pspec = slist->data;
- guint i;
-
- /* dedup, make pspecs in the list unique */
- for (i = 0; i < n_pspecs; i++)
- {
- if (pspecs[i] == pspec)
- break;
- }
-
- if (i == n_pspecs) /* if no match was found */
- pspecs[n_pspecs++] = pspec;
+ pspecs[n_pspecs++] = slist->data;
}
g_datalist_id_set_data (&object->qdata, context->quark_notify_queue, NULL);
pspec = redirect;
/* we do the deduping in _thaw */
- nqueue->pspecs = g_slist_prepend (nqueue->pspecs, pspec);
- nqueue->n_pspecs++;
+ if (g_slist_find (nqueue->pspecs, pspec) == NULL)
+ {
+ nqueue->pspecs = g_slist_prepend (nqueue->pspecs, pspec);
+ nqueue->n_pspecs++;
+ }
G_UNLOCK(notify_lock);
}