[
https://issues.apache.org/jira/browse/THRIFT-2832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653639#comment-14653639
]
ASF GitHub Bot commented on THRIFT-2832:
----------------------------------------
GitHub user simonsouth opened a pull request:
https://github.com/apache/thrift/pull/578
THRIFT-2832: c_glib: Handle string lists correctly
These commits
- Add a unit test for C (GLib) that covers containers (initially only
string lists, i.e. variables of type `list<string>`) used as
- Parameters to a service method,
- Return values from a service method and
- Struct members with default values.
- Fix the compiler so it correctly generates code in the above three cases.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/simonsouth/thrift
thrift-2832-c_glib-handle-string-lists-correctly
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/578.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #578
----
commit 5d1ad897c44a576adea62abadb9bb196cc6f1cc6
Author: Simon South <[email protected]>
Date: 2015-08-04T13:15:50Z
c_glib: Library: Add unit test for containers
This change adds a unit test that covers containers (initially
only string lists) used as parameters to and return values from
service methods, and as members with default values inside structs.
commit 11f8d3376b95447b46a7b0a0d49ca856a2cab226
Author: Simon South <[email protected]>
Date: 2015-08-04T13:22:57Z
c_glib: Compiler: Handle string lists correctly
With this change the compiler now correctly generates code for
string lists (i.e. variables of type list<string>) that are
- Passed as a parameter to a service method,
- Returned from a service method or
- Assigned a default value.
----
> c_glib: Handle string lists correctly
> -------------------------------------
>
> Key: THRIFT-2832
> URL: https://issues.apache.org/jira/browse/THRIFT-2832
> Project: Thrift
> Issue Type: Question
> Components: C glib - Compiler
> Affects Versions: 0.9.2
> Reporter: wuhzj
> Assignee: Simon South
> Priority: Minor
>
> The C (GLib) compiler in its present form will generate incorrect code for
> string lists (i.e. variables of type {{list<string>}}) that are
> - Passed as a parameter to a method,
> - Returned from a method, or
> - Assigned a default value.
> In each case, the issue relates to the compiler not recognizing a string list
> is represented as an instance of GLib's {{GPtrArray}}, instead of {{GArray}}
> used to represent most other types of lists.
> Fixing this will silence a number of compiler warnings when building the
> generated code.
> ----
> I noticed that in latest thrift v0.9.2, the C (GLib) compiler and library to
> add support for implementing servers.
> But in my case, I got some compiling warnings in when compiling the generated
> server side code after upgrade to 0.9.2. Actually, I just use thrift c glib
> in client side, Is it possible to generate the client side code only?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)