After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 543055 - int64 properties do not use g_param_spec_int64
int64 properties do not use g_param_spec_int64
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.3.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-15 08:51 UTC by Christian Hergert
Modified: 2008-07-16 22:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds support for int64 and uint64 properties (1.33 KB, patch)
2008-07-15 09:04 UTC, Christian Hergert
committed Details | Review

Description Christian Hergert 2008-07-15 08:51:49 UTC
Please describe the problem:
An Object with a property of type int64 generates property code that uses g_param_spec_pointer instead of g_param_spec_int64.

Steps to reproduce:
using GLib;

public class Test.Object: GLib.Object {
        public int64 id {
                get;
                set;
        }

        static void main (string[] args) {}
}

valac -C test.vala

Actual results:
g_object_class_install_property (G_OBJECT_CLASS (klass), TEST_OBJECT_ID, g_param_spec_pointer ("id", "id", "id", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));

Expected results:
g_object_class_install_property (G_OBJECT_CLASS (klass), TEST_OBJECT_ID, g_param_spec_int64 ("id", "id", "id", G_MININT64, G_MAXINT64, 0 G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));

Does this happen every time?
Yes

Other information:
Comment 1 Christian Hergert 2008-07-15 09:04:04 UTC
Created attachment 114584 [details] [review]
Adds support for int64 and uint64 properties
Comment 2 Christian Hergert 2008-07-16 09:43:33 UTC
Can someone review and commit?
Comment 3 Jürg Billeter 2008-07-16 22:10:41 UTC
Thanks for the patch.

2008-07-17  Jürg Billeter  <j@bitron.ch>

	* gobject/valaccodetypesymbolbinding.vala:

	Support int64 and uint64 properties in GObjects,
	patch by Christian Hergert, fixes bug 543055

Fixed in r1701.