Details
Description
When using namespaces for c_glib compiler generates incorrect code for #includes.
Example:
first.thrift
namespace c_glib F struct first { 1: i32 test }
and second.thrift
namespace c_glib S include "first.thrift" struct second { 1: first.first second }
As you can see, we use namespace F in first.thrift and namespace S in second.thrift.
The compiler generates correct file names for those thrifts:
$ ls gen-c_glib/ f_first_types.c f_first_types.h s_second_types.c s_second_types.h
However, when generating s_second_types.h it uses namespace from second.thrift instead of the one defined for first.thrift when generating #include statement.
/* base includes */ #include <glib-object.h> #include <thrift/c_glib/thrift_struct.h> #include <thrift/c_glib/protocol/thrift_protocol.h> /* other thrift includes */ #include "s_first_types.h"
It should use #include "f_first_types.h"
Attachments
Attachments
Issue Links
- links to