#341 Sources/Modules/python.cxx: Use space inside template brackets to avoid treating <:: as digraph.

None
closed
nobody
None
5
2013-07-01
2013-06-13
Mike
No

When ptype is global (::something) <: is a digraph for [

diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index 9a068a4..814626a 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -4724,7 +4724,7 @@ int PYTHON::classDirectorMethod(Node n, Node parent, String super) {
/
if necessary, cast away const since Python doesn't support it! /
if (SwigType_isconst(nptype)) {
nonconst = NewStringf("nc_tmp_%s", pname);
- String
nonconst_i = NewStringf("= const_cast<%s>(%s)", SwigType_lstr(ptype, 0), ppname
+ String *nonconst_i = NewStringf("= const_cast< %s >(%s)", SwigType_lstr(ptype, 0), ppna
Wrapper_add_localv(w, nonconst, SwigType_lstr(ptype, 0), nonconst, nonconst_i, NIL);
Delete(nonconst_i);
Swig_warning(WARN_LANG_DISCARD_CONST, input_file, line_number,

Discussion

  • William Fulton
    William Fulton
    2013-07-01

    • status: open --> closed
    • Group: -->
     
  • William Fulton
    William Fulton
    2013-07-01

    Thanks, applied for swig-2.0.11.