Unable to use ModelTag from Vala with owned variables
Bug #911667 reported by
Michal Hruby
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
Fix Released
|
Low
|
Michal Hruby | ||
dee |
Fix Released
|
Low
|
Michal Hruby | ||
dee (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
unity (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Methods using Dee.ModelTag are bound using void*, which makes mem-management very difficult (in vala terms). The class should be defined as a generic one.
As an example currently it's not really straightforward how to put an owned string to a tag, one would probably use:
unowned Dee.ModelTag tag = model.register_tag (GLib.free);
model.set_tag (iter, tag, "foo".dup ());
debug ("%s", (string) model.get_tag (iter, tag));
But the variable with "foo" is freed right after the set_tag call.
Related branches
lp:~mhr3/dee/vala-tags
- Mikkel Kamstrup Erlandsen (community): Approve
-
Diff: 107 lines (+34/-12)3 files modifiedvapi/Dee-1.0-custom.vala (+20/-6)
vapi/Dee-1.0.metadata (+4/-0)
vapi/dee-1.0.vapi (+10/-6)
Changed in dee: | |
assignee: | nobody → Michal Hruby (mhr3) |
importance: | Undecided → Low |
status: | New → Fix Committed |
status: | Fix Committed → In Progress |
milestone: | none → 1.0.0 |
Changed in dee: | |
status: | In Progress → Fix Committed |
Changed in unity: | |
assignee: | nobody → Michal Hruby (mhr3) |
importance: | Undecided → Low |
milestone: | none → 5.0.0 |
status: | New → Fix Committed |
Changed in dee: | |
status: | Fix Committed → Fix Released |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity (Ubuntu): | |
status: | New → Fix Released |
To post a comment you must log in.
This bug was fixed in the package dee - 1.0.0-0ubuntu1
---------------
dee (1.0.0-0ubuntu1) precise; urgency=low
* New upstream release. introspection 0.10.2 dee-tools. install, debian/control:
- DeeModel support insert_sorted() and find_sorted() (LP: #913128)
- Dee should support simple transactions (LP: #894023)
- DeeSequenceModel optimized getters (LP: #900629)
- DeeFilter and DeeFilterModel can not work properly with GI and/or PyGI
(LP: #904293)
- DeePeer and DeeSharedModel should support peer-2-peer DBus connections
(LP: #904299)
- Implement a DeeTreeIndex (LP: #622446)
- DeeSharedModel should signal on remote transactions (LP: #912675)
- Unable to use ModelTag from Vala with owned variables (LP: #911667)
- DeeSequenceModel optimize signal emissions (LP: #901098)
- DeeModel needs a benchmark suite (LP: #901100)
* debian/rules:
- enable documentation building (for daily build)
* Do not use source 3 as doesn't work well with bzr merge-upstream
when upstream is in bzr.
* debian/control:
- build-dep on gobject-
- readd Bzr-Vcs to be able to point to this branch
* debian/
- add dee-tools package
* debian/rules, debian/control, debian/*symbols, debian/*install:
- handle ABI break and gir bump naming. Replaces: the right packages
for the gir override file
- update with new symbols
-- Didier Roche <email address hidden> Thu, 12 Jan 2012 17:48:20 +0100