Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix warnings on building liblangtag-gobject

  • Loading branch information...
commit eb8036f43db8d8367a971f1b90e6622bfbf9cf12 1 parent 684837c
@tagoh authored
View
4 liblangtag-gobject/gengir.sh
@@ -28,7 +28,7 @@ s/\([ \t].*\)${__cl};/\\\1${__Cl};/g
s/\([ \t].*\)_${__cl}/\\\1_${__Cl}/g
s/\([\t(].*\)${__cl}/\\\1${__Cl}/g
s/^\([ \t].*\)${__cl}/\\\1${__Cl}/g" > $__tmpsed
- sed -f $__tmpsed $__in > $__out
+ sed -f $__tmpsed $__in >> $__out
rm $__tmpsed
}
@@ -39,9 +39,11 @@ _cl=`guess_type $target`
_ns=`echo $_cl|cut -d'_' -f1`
_tmpgen=`mktemp gengir.XXXXXXXX`
+echo "#include <glib.h>" > $_tmpgen
capitalize "$srcdir/$target" $_tmpgen $_cl
sed -i -e 's,^\(#include[ \t]<\)liblangtag\(/lt-.*\)\(\.h>\),\1liblangtag-gobject\2.gir\3,' $_tmpgen
+sed -i -e 's/ssize_t/gssize/g' -e 's/size_t/gsize/g' $_tmpgen
while [ 1 ]; do
if [ "x$type" = "xh" ]; then
View
1  liblangtag-gobject/lt-gobject.c
@@ -39,6 +39,7 @@ LT_DEFINE_BOXED_TYPE(extlang_db, ExtlangDb)
LT_DEFINE_BOXED_TYPE(extlang, Extlang)
LT_DEFINE_BOXED_TYPE(grandfathered_db, GrandfatheredDb)
LT_DEFINE_BOXED_TYPE(grandfathered, Grandfathered)
+LT_DEFINE_BOXED_TYPE(iter, Iter)
LT_DEFINE_BOXED_TYPE(lang_db, LangDb)
LT_DEFINE_BOXED_TYPE(lang, Lang)
LT_DEFINE_BOXED_TYPE(list, List)
View
2  liblangtag-gobject/lt-gobject.h
@@ -25,6 +25,7 @@ G_BEGIN_DECLS
#define LT_TYPE_EXTLANG lt_extlang_get_type()
#define LT_TYPE_GRANDFATHERED_DB lt_grandfathered_db_get_type()
#define LT_TYPE_GRANDFATHERED lt_grandfathered_get_type()
+#define LT_TYPE_ITER lt_iter_get_type()
#define LT_TYPE_LANG_DB lt_lang_db_get_type()
#define LT_TYPE_LANG lt_lang_get_type()
#define LT_TYPE_LIST lt_list_get_type()
@@ -48,6 +49,7 @@ GType lt_extlang_db_get_type (void);
GType lt_extlang_get_type (void);
GType lt_grandfathered_db_get_type(void);
GType lt_grandfathered_get_type (void);
+GType lt_iter_get_type (void);
GType lt_lang_db_get_type (void);
GType lt_lang_get_type (void);
GType lt_list_get_type (void);
View
21 liblangtag/lt-iter.c
@@ -33,6 +33,27 @@ lt_iter_tmpl_init(lt_iter_tmpl_t *tmpl)
/*< public >*/
lt_iter_t *
+lt_iter_ref(lt_iter_t *iter)
+{
+ lt_iter_tmpl_t *tmpl;
+
+ lt_return_val_if_fail (iter != NULL, NULL);
+
+ tmpl = iter->target;
+
+ return lt_mem_ref(&tmpl->parent);
+}
+
+void
+lt_iter_unref(lt_iter_t *iter)
+{
+ lt_iter_tmpl_t *tmpl = iter->target;
+
+ if (iter)
+ lt_mem_unref(&tmpl->parent);
+}
+
+lt_iter_t *
lt_iter_init(lt_iter_tmpl_t *tmpl)
{
lt_iter_t *retval;
View
2  liblangtag/lt-iter.h
@@ -28,6 +28,8 @@ struct _lt_iter_t {
lt_iter_tmpl_t *target;
};
+lt_iter_t *lt_iter_ref (lt_iter_t *iter);
+void lt_iter_unref (lt_iter_t *iter);
lt_iter_t *lt_iter_init (lt_iter_tmpl_t *tmpl);
void lt_iter_finish(lt_iter_t *iter);
lt_bool_t lt_iter_next (lt_iter_t *iter,
Please sign in to comment.
Something went wrong with that request. Please try again.