You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/11/05 05:49:23 UTC

[jira] [Commented] (THRIFT-2684) c_glib: Improvements to map deserialization in generated code

    [ https://issues.apache.org/jira/browse/THRIFT-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14197591#comment-14197591 ] 

Hudson commented on THRIFT-2684:
--------------------------------

SUCCESS: Integrated in Thrift #1331 (See [https://builds.apache.org/job/Thrift/1331/])
THRIFT-2684 c_glib: Improvements to map deserialization in generated code (roger: rev 008f42cb3846fdfbcdc85acfe129680fd51c2def)
* compiler/cpp/src/generate/t_c_glib_generator.cc


> c_glib: Improvements to map deserialization in generated code
> -------------------------------------------------------------
>
>                 Key: THRIFT-2684
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2684
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C glib - Compiler
>    Affects Versions: 0.9.1
>         Environment: Fedora 20 64-bit on x86_64
>            Reporter: Simon South
>            Assignee: Simon South
>            Priority: Minor
>              Labels: c_glib, compiler, memory-leak
>             Fix For: 0.9.2
>
>         Attachments: thrift-2684-c_glib-improve-map-deserialization.patch
>
>
> The attached patch to the compiler improves memory management in generated code relating to the deserialization of maps (implemented using hash tables in c_glib). It makes three changes:
> 1. Newly created hash tables are constructed with references to the correct hashing, comparison and deallocation functions, as determined by the types they hold.
> 2. Base types allocated on the heap will be automatically deallocated with the {{g_free}} function (instead of not being deallocated at all!).
> 3. The direct-comparison function is now explicitly specified for enumerated types, which are (somewhat dubiously) always stored _within_ a pointer value instead of on the heap.
> (No test case for these changes either, mostly as I'm unsure how I'd write one. Again the integration test serves as a pretty rigorous test of this code, though it completes with or without this patch applied.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)