Re: [anjuta-devel] How to get the type of member that is a pointer using symbol-db



On Thu, Jul 25, 2013 at 6:40 PM, Massimo Cora' <maxcvs email it> wrote:
Hi,


On 07/25/2013 04:26 PM, Marco Diego Aurélio Mesquita wrote:

Hi devs,

While testing the "create getter" feature I'm implementing[1], I
stumbled upon a problem: I created a pointer to a GtkWidget in the
private struct of a class and, when I created the getter method, the
created method type was "GtkWidget" instead of "GtkWidget*".

Is there a way to correctly get the type of a member of an struct that
is a pointer using symbol-db?


IIRC this feature was implemented and was working.
In some ways it seems that a regression made it not working.

sdb_engine_extract_type_qualifier () in symbol-db-engine-core was the
function responsible for the type extraction.



Are you sure it has ever worked correctly? I took a look in the regex
in sdb_engine_extract_type_qualifier and it doesn't seems capable of
correctly getting the type name of pointer members.

I think that a viable approach is to scan the string (after removing
comments) between the member name and the type name to search for '*'
or '&'. Is there any problem with this approach?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]