From 58b5256e0566fee7f4412eae0cf969ff4d773e01 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Thu, 7 Jul 2011 11:32:22 +0000 Subject: [PATCH] Fixed C functions parsing in rst parser --- modules/java/rst_parser.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/java/rst_parser.py b/modules/java/rst_parser.py index b90145c..3179170 100644 --- a/modules/java/rst_parser.py +++ b/modules/java/rst_parser.py @@ -374,12 +374,13 @@ class RstParser(object): return fname = fname.replace(".", "::") - if fname == "cv::cv" + func.get("name", ""): - func["name"] = fname[2:] - func["method"] = fname[2:] - else: - print "RST parser warning: invalid definition of old C function \"%s\" - section name is \"%s\" instead of \"%s\". File: %s (line %s)" % (fname, func["name"], fname[6:], func["file"], func["line"]) -# self.print_info(func) + if fname.startswith("cv::cv"): + if fname[6:] == func.get("name", ""): + func["name"] = fname[4:] + func["method"] = fname[4:] + else: + print "RST parser warning: invalid definition of old C function \"%s\" - section name is \"%s\" instead of \"%s\". File: %s (line %s)" % (fname, func["name"], fname[6:], func["file"], func["line"]) + #self.print_info(func) def normalizeText(self, s): if s is None: -- 2.7.4