summaryrefslogtreecommitdiffstats
path: root/gobject/generate-constants.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-27 10:30:30 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-27 10:30:30 +0000
commitfca788c706317aa371e81c1c070c888ad245b31f (patch)
tree399c275f5633d5fdd6168ba6cdc499be4fa15c4b /gobject/generate-constants.c
parent99f90ceb215313ca0e34510f7a080339f48e12ce (diff)
downloadpygobject-fca788c706317aa371e81c1c070c888ad245b31f.tar.gz
pygobject-fca788c706317aa371e81c1c070c888ad245b31f.tar.xz
pygobject-fca788c706317aa371e81c1c070c888ad245b31f.zip
Remove tabs. Use sys.exc_info()[1] to fetch the exception value
2008-07-27 Johan Dahlin <johan@gnome.org> * glib/option.py: Remove tabs. Use sys.exc_info()[1] to fetch the exception value * gobject/__init__.py: * gobject/propertyhelper.py: Import gobject._gobject instead of just gobject. * gobject/Makefile.am: * gobject/constants.py.in: * gobject/generate-constants.c (main): Don't add long suffix if python >= 3.0 svn path=/trunk/; revision=887
Diffstat (limited to 'gobject/generate-constants.c')
-rw-r--r--gobject/generate-constants.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gobject/generate-constants.c b/gobject/generate-constants.c
index 2a6e4d2..f872a36 100644
--- a/gobject/generate-constants.c
+++ b/gobject/generate-constants.c
@@ -1,5 +1,12 @@
#include <stdio.h>
#include <glibconfig.h>
+#include <Python.h>
+
+#if PY_VERSION_HEX < 0x03000000
+# define LONGSUFFIX "L"
+#else
+# define LONGSUFFIX ""
+#endif
int main(void)
{
@@ -15,8 +22,8 @@ int main(void)
printf("G_MININT = %d\n", G_MININT);
printf("G_MAXINT = %d\n", G_MAXINT);
printf("G_MAXUINT = %u\n", G_MAXUINT);
- printf("G_MINLONG = %ldL\n", G_MINLONG);
- printf("G_MAXLONG = %ldL\n", G_MAXLONG);
- printf("G_MAXULONG = %luL\n", G_MAXULONG);
+ printf("G_MINLONG = %ld%s\n", G_MINLONG, LONGSUFFIX);
+ printf("G_MAXLONG = %ld%s\n", G_MAXLONG, LONGSUFFIX);
+ printf("G_MAXULONG = %lu%s\n", G_MAXULONG, LONGSUFFIX);
return 0;
}