* Mono Project (http://www.mono-project.com)
*
* Copyright (C) 2005-2008 Novell, Inc. (http://www.novell.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include <string.h>
MonoMethodDesc *result;
char *class_name, *class_nspace, *method_name, *use_args, *end;
int use_namespace;
+ int generic_delim_stack;
class_nspace = g_strdup (name);
use_args = strchr (class_nspace, '(');
end = use_args;
if (*end)
result->num_args = 1;
+ generic_delim_stack = 0;
while (*end) {
- if (*end == ',')
+ if (*end == '<')
+ generic_delim_stack++;
+ else if (*end == '>')
+ generic_delim_stack--;
+
+ if (*end == ',' && generic_delim_stack == 0)
result->num_args++;
++end;
}