Fix code generator: Put on the array only the next element after 'a'.
For example "(aii)" produced: member(const ::DBus::Struct< std::vector< int32_t, int32_t > >& arg) And now it produces: member(const ::DBus::Struct< std::vector< int32_t >, int32_t >& arg)
This commit is contained in:
parent
21ba70529d
commit
d91fb952d3
2 changed files with 5 additions and 3 deletions
|
@ -85,7 +85,7 @@ const char *atomic_type_to_string(char t)
|
|||
return atos[i].name;
|
||||
}
|
||||
|
||||
void _parse_signature(const string &signature, string &type, unsigned int &i)
|
||||
static void _parse_signature(const string &signature, string &type, unsigned int &i, bool only_once = false)
|
||||
{
|
||||
cout << "signature: " << signature << endl;
|
||||
cout << "type: " << type << endl;
|
||||
|
@ -120,7 +120,7 @@ void _parse_signature(const string &signature, string &type, unsigned int &i)
|
|||
default:
|
||||
{
|
||||
type += "std::vector< ";
|
||||
_parse_signature(signature, type, i);
|
||||
_parse_signature(signature, type, i, true);
|
||||
|
||||
type += " >";
|
||||
|
||||
|
@ -158,6 +158,9 @@ void _parse_signature(const string &signature, string &type, unsigned int &i)
|
|||
}
|
||||
}
|
||||
|
||||
if (only_once)
|
||||
return;
|
||||
|
||||
if (i+1 < signature.length() && signature[i+1] != ')' && signature[i+1] != '}')
|
||||
{
|
||||
type += ", ";
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
const char *atomic_type_to_string(char t);
|
||||
std::string stub_name(std::string name);
|
||||
std::string signature_to_type(const std::string &signature);
|
||||
void _parse_signature(const std::string &signature, std::string &type, unsigned int &i);
|
||||
void underscorize(std::string &str);
|
||||
|
||||
/// create std::string from any number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue