On Fri, 2006-12-15 at 11:34 +0100, Denis Leroy wrote:
> Since we updated to python 2.5, glom 1.2.2 is failing to build on 
> x86_64. I'm a bit short on time and will not have time to look at this 
> in depth before a few days, so if anyone has an easy fix for this
> 
> 
> py_glom_related.cc:194: error: invalid conversion from 'int 
> (*)(PyObject*)' to 'Py_ssize_t (*)(PyObject*)'
> py_glom_record.cc: In function 'PyObject* 
> Glom::Record_tp_as_mapping_getitem(Glom::PyGlomRecord*, PyObject*)':
> py_glom_record.cc:197: warning: format '%d' expects type 'int', but 
> argument 4 has type 'size_t'
> py_glom_record.cc: At global scope:
> py_glom_record.cc:234: error: invalid conversion from 'int 
> (*)(PyObject*)' to 'Py_ssize_t (*)(PyObject*)'
> make[5]: *** [py_glom_record.lo] Error 1

This patch, or something like it, might fix it. It doesn't build for me
(on Ubuntu Edgy) with Python 2.4.3, because Py_ssize_t is not defined.


-- 
Murray Cumming
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com
? aclocal.m4
? ambig.patch
? autom4te.cache
? config.guess
? config.h
? config.log
? config.status
? config.sub
? configure
? doc_version.patch
? doubly_related_portals_ui.patch
? doubly_related_portals_ui2.patch
? fieldwarn.patch
? findcaps.patch
? glom-1.3.1.tar.gz
? glom-1.3.2.tar.gz
? glom-1.3.3.tar.gz
? glom-1.3.4.tar.gz
? glom.desktop
? glom.desktop.in
? glom_port.patch
? glom_port_libgdamm3_halfdone.patch
? glom_python25.patch
? glomgermany
? glomgermany2.po
? intltool-extract
? intltool-extract.in
? intltool-merge
? intltool-merge.in
? intltool-update
? intltool-update.in
? libtool
? ltmain.sh
? mkinstalldirs
? python-apt-0.6.16.2ubuntu8
? python-apt_0.6.16.2ubuntu8.tar.gz
? stamp-h1
? temp.patch
? temp_clear.patch
? temp_tree.patch
? temp_tree2.patch
? test2p2a.glom
? test2p2b.glom
? test2p2c.glom
? testwithscans.glom
? tmp_apt_archives
? tmp_apt_varlibapt
? tmp_apt_varlibdpkg
? translation
? tree_recreate.patch
? docs/Makefile
? docs/Makefile.in
? docs/user-guide/Makefile
? docs/user-guide/Makefile.in
? docs/user-guide/de/.xml2po.mo
? docs/user-guide/de/glom.xml
? docs/user-guide/de/legal.xml
? docs/user-guide/sv/.xml2po.mo
? docs/user-guide/sv/glom.xml
? docs/user-guide/sv/legal.xml
? examples/Makefile
? examples/Makefile.in
? glom/glom
? glom/glom.glade.backup
? glom/glom.gladep
? glom/test_pyembed
? glom/layout_item_dialogs/Makefile
? glom/layout_item_dialogs/Makefile.in
? glom/libglom/Makefile
? glom/libglom/Makefile.in
? glom/libglom/test
? glom/libglom/data_structure/Makefile
? glom/libglom/data_structure/Makefile.in
? glom/libglom/data_structure/layout/Makefile
? glom/libglom/data_structure/layout/Makefile.in
? glom/libglom/data_structure/layout/report_parts/Makefile
? glom/libglom/data_structure/layout/report_parts/Makefile.in
? glom/libglom/document/Makefile
? glom/libglom/document/Makefile.in
? glom/libglom/python_embed/Makefile
? glom/libglom/python_embed/Makefile.in
? glom/libglom/python_embed/py_glom_record.loT
? glom/mode_data/Makefile
? glom/mode_data/Makefile.in
? glom/mode_design/Makefile
? glom/mode_design/Makefile.in
? glom/mode_design/fields/Makefile
? glom/mode_design/fields/Makefile.in
? glom/mode_design/script_library/Makefile
? glom/mode_design/script_library/Makefile.in
? glom/mode_design/users/Makefile
? glom/mode_design/users/Makefile.in
? glom/mode_find/Makefile
? glom/mode_find/Makefile.in
? glom/navigation/Makefile
? glom/navigation/Makefile.in
? glom/python_embed/Makefile
? glom/python_embed/Makefile.in
? glom/python_embed/python_module/Makefile
? glom/python_embed/python_module/Makefile.in
? glom/relationships_overview/Makefile
? glom/relationships_overview/Makefile.in
? glom/reports/Makefile
? glom/reports/Makefile.in
? glom/translation/Makefile
? glom/translation/Makefile.in
? glom/utility_widgets/Makefile
? glom/utility_widgets/Makefile.in
? glom/utility_widgets/test
? glom/utility_widgets/adddel/Makefile
? glom/utility_widgets/adddel/Makefile.in
? glom/utility_widgets/adddel/eggcolumnchooser/Makefile
? glom/utility_widgets/adddel/eggcolumnchooser/Makefile.in
? glom/utility_widgets/db_adddel/Makefile
? glom/utility_widgets/db_adddel/Makefile.in
? icons/Makefile
? icons/Makefile.in
? macros/Makefile
? macros/Makefile.in
? po/stamp-it
Index: glom/libglom/python_embed/py_glom_record.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/python_embed/py_glom_record.cc,v
retrieving revision 1.4
diff -u -p -r1.4 py_glom_record.cc
--- glom/libglom/python_embed/py_glom_record.cc	10 Oct 2006 16:04:38 -0000	1.4
+++ glom/libglom/python_embed/py_glom_record.cc	15 Dec 2006 11:44:29 -0000
@@ -170,7 +170,7 @@ static PyGetSetDef Record_getseters[] = 
 
 
 
-static int
+static Py_ssize_t
 Record_tp_as_mapping_length(PyGlomRecord *self)
 {
   return self->m_pMap_field_values->size();
@@ -194,7 +194,7 @@ Record_tp_as_mapping_getitem(PyGlomRecor
         }
         else
         {
-          g_warning("Record_tp_as_mapping_getitem(): item not found in m_pMap_field_values. size=%d, item=%s", self->m_pMap_field_values->size(), pchKey);
+          g_warning("Record_tp_as_mapping_getitem(): item not found in m_pMap_field_values. size=%d, item=%s", (int)self->m_pMap_field_values->size(), pchKey);
         }
       }
       else
@@ -219,7 +219,7 @@ Record_tp_as_mapping_getitem(PyGlomRecor
 }
 
 /*
-static int
+static Py_ssize_t
 Record_tp_as_mapping_setitem(PyGObject *self, PyObject *item, PyObject *value)
 {
   Py_INCREF(Py_None);
_______________________________________________
glom-devel-list mailing list
glom-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Reply via email to