projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2810 from kumpera/fix_hazard_free
[mono.git]
/
mono
/
metadata
/
debug-helpers.c
diff --git
a/mono/metadata/debug-helpers.c
b/mono/metadata/debug-helpers.c
index fb5aede58fc0c65506281e7504224df2d76f5fd5..baf79f6be9709502aa442df5fe76f9570e73719a 100644
(file)
--- a/
mono/metadata/debug-helpers.c
+++ b/
mono/metadata/debug-helpers.c
@@
-5,6
+5,7
@@
* Mono Project (http://www.mono-project.com)
*
* Copyright (C) 2005-2008 Novell, Inc. (http://www.novell.com)
* 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>
*/
#include <string.h>
@@
-333,6
+334,7
@@
mono_method_desc_new (const char *name, gboolean include_namespace)
MonoMethodDesc *result;
char *class_name, *class_nspace, *method_name, *use_args, *end;
int use_namespace;
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, '(');
class_nspace = g_strdup (name);
use_args = strchr (class_nspace, '(');
@@
-379,8
+381,14
@@
mono_method_desc_new (const char *name, gboolean include_namespace)
end = use_args;
if (*end)
result->num_args = 1;
end = use_args;
if (*end)
result->num_args = 1;
+ generic_delim_stack = 0;
while (*end) {
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;
}
result->num_args++;
++end;
}