From ad0428538d491f24f212d0f6e3ac51a31ba5f421 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 30 Jul 2009 14:01:27 +0000 Subject: [PATCH] PHP: fix for the cpp_namespace testcase git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11480 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/php.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index 551773352..fdf88c92e 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -1175,6 +1175,11 @@ public: assert(0 <= argno && argno < max_num_of_arguments); String *&pname = arg_names[argno]; const char *pname_cstr = GetChar(p, "name"); + // Just get rid of the C++ namespace part for now. + const char *ptr = NULL; + if ((ptr = strrchr(pname_cstr, ':'))) { + pname_cstr = ptr + 1; + } if (!pname_cstr) { // Unnamed parameter, e.g. int foo(int); } else if (pname == NULL) {