qstring.c (7e0019a7196ebed177c95824875cf852e1a6f667) qstring.c (7dc847ebba953db90853d15f140c20eef74d4fb2)
1/*
2 * QString Module
3 *
4 * Copyright (C) 2009 Red Hat Inc.
5 *
6 * Authors:
7 * Luiz Capitulino <lcapitulino@redhat.com>
8 *

--- 118 unchanged lines hidden (view full) ---

127 return qstring->string;
128}
129
130/**
131 * qstring_is_equal(): Test whether the two QStrings are equal
132 */
133bool qstring_is_equal(const QObject *x, const QObject *y)
134{
1/*
2 * QString Module
3 *
4 * Copyright (C) 2009 Red Hat Inc.
5 *
6 * Authors:
7 * Luiz Capitulino <lcapitulino@redhat.com>
8 *

--- 118 unchanged lines hidden (view full) ---

127 return qstring->string;
128}
129
130/**
131 * qstring_is_equal(): Test whether the two QStrings are equal
132 */
133bool qstring_is_equal(const QObject *x, const QObject *y)
134{
135 return !strcmp(qobject_to_qstring(x)->string,
136 qobject_to_qstring(y)->string);
135 return !strcmp(qobject_to(QString, x)->string,
136 qobject_to(QString, y)->string);
137}
138
139/**
140 * qstring_destroy_obj(): Free all memory allocated by a QString
141 * object
142 */
143void qstring_destroy_obj(QObject *obj)
144{
145 QString *qs;
146
147 assert(obj != NULL);
137}
138
139/**
140 * qstring_destroy_obj(): Free all memory allocated by a QString
141 * object
142 */
143void qstring_destroy_obj(QObject *obj)
144{
145 QString *qs;
146
147 assert(obj != NULL);
148 qs = qobject_to_qstring(obj);
148 qs = qobject_to(QString, obj);
149 g_free(qs->string);
150 g_free(qs);
151}
149 g_free(qs->string);
150 g_free(qs);
151}