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 421183 - pygda does not wrap some essential functions
pygda does not wrap some essential functions
Status: RESOLVED FIXED
Product: gnome-python-extras
Classification: Deprecated
Component: gda
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Murray Cumming
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-21 19:35 UTC by Armin Burgmeier
Modified: 2007-03-27 18:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds an ArgType for GValue* (18.84 KB, patch)
2007-03-21 19:37 UTC, Armin Burgmeier
none Details | Review

Description Armin Burgmeier 2007-03-21 19:35:46 UTC
This patch adds an argtype for GValue so that gda functions taking or returning a GValue* are wrapped by the code generator.

There is still a problem with functions returning a GdaDataModel: The datamodel implementation depends on the provider. When calling gda_data_model_execute_select_command() on a connection with a postgresql provider, the actual type of the returned GdaDataModel is GdaPostgresRecordset. However, this is private API and users should work with the GdaDataModel interface. When a GdaDataModel is returned, pygda wants to wrap the actual type, but it fails, because it does not know anything about GdaPostgresRecordset.

I am not sure how to fix that. A possible solution would be to define all the recordsets in gda.defs by hand and put the gda_postgres_recordset_get_type prototype and GDA_TYPE_POSTGRES_RECORDSET macro in gdaglue.h (for each provider libgda supports). The patch does not yet cover this because this approach seems like a bit of a hack to me. Perhaps someone comes up with a better idea.
Comment 1 Armin Burgmeier 2007-03-21 19:37:55 UTC
Created attachment 85068 [details] [review]
Adds an ArgType for GValue*
Comment 2 Murray Cumming 2007-03-22 08:58:46 UTC
Feel free to apply the patch. I'll try to give the DataModel issue some thought.
Comment 3 Murray Cumming 2007-03-27 07:24:30 UTC
This patch does not apply cleanly anymore. Could you please investigate, and apply what you need.
Comment 4 Armin Burgmeier 2007-03-27 13:41:48 UTC
This patch is already committed to SVN. I cannot mark it as committed in bugzilla, though.
Comment 5 Murray Cumming 2007-03-27 13:44:56 UTC
Thanks.

Please ask for bug-closing permissions from the bugsquad.
Comment 6 Armin Burgmeier 2007-03-27 13:50:49 UTC
The patch does not cover the problem with the GdaDataModel-returning functions, so it does not fully fix the problem.
Comment 7 Murray Cumming 2007-03-27 16:35:08 UTC
I suspect that this is now fixed, after my recent changes. When you have a chance, could you check again, please.
Comment 8 Armin Burgmeier 2007-03-27 18:11:04 UTC
Yes, this seems to be fixed now.