<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">thanks for reporting. This seems to be a problem in pygccxml.</div><div class=""><br class=""></div><div class="">To help me understand the exact problem, would it be possible</div><div class="">to provide a minimal c++ code example, and the pygccxml</div><div class="">code you are calling?</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class="">Michka</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 21 May 2017, at 12:27, Ankit Deepak <<a href="mailto:adadeepak8@gmail.com" class="">adadeepak8@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello all,<div class=""><br class=""></div><div class="">I think I found out where the error was. The problem was not with the pointer but the space between the type and '*' operator. When working with pointers, "find_value_type" of "traits_impl_details" removes the '*' using a substring operation, and when that happened, it tried to find the type of the actual type along with a space. If this is not an intended behaviour of the code, then a possible enhancement could be to strip the type string of the trailing spaces before the find operation.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Ankit Deepak</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, May 19, 2017 at 7:33 PM, Ankit Deepak <span dir="ltr" class=""><<a href="mailto:adadeepak8@gmail.com" target="_blank" class="">adadeepak8@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hello all,<div class=""><br class=""></div><div class="">I have started working on CastXML recently. I am trying to modify pybindgen [1] to work with CastXML and latest versions of pygccxml. "__find_xxx_type" of "container_traits" throws Runtime Error when it encounters std containers having pointers as elements, it works fine with other containers. The traceback looks like:</div><div class=""><br class=""></div><div class=""><div class="">Traceback (most recent call last):</div><div class="">  File "/home/ankit/Videos/bake/<wbr class="">source/ns-3-dev/bindings/<wbr class="">python/ns3modulescan-modular.<wbr class="">py", line 284, in <module></div><div class="">    ns3_module_scan(sys.argv[1], sys.argv[2], eval(sys.argv[3]), sys.argv[4], sys.argv[5])</div><div class="">  File "/home/ankit/Videos/bake/<wbr class="">source/ns-3-dev/bindings/<wbr class="">python/ns3modulescan-modular.<wbr class="">py", line 265, in ns3_module_scan</div><div class="">    module_parser.scan_types()</div><div class="">  File "/home/ankit/Videos/bake/<wbr class="">source/pybindgen/pybindgen/<wbr class="">castxmlparser.py", line 801, in scan_types</div><div class="">    self._scan_namespace_types(<wbr class="">self.module, self.module_namespace, pygen_register_function_name="<wbr class="">register_types")</div><div class="">  File "/home/ankit/Videos/bake/<wbr class="">source/pybindgen/pybindgen/<wbr class="">castxmlparser.py", line 1334, in _scan_namespace_types</div><div class="">    self._register_container(<wbr class="">module, traits, type_info, _outer_class, name)</div><div class="">  File "/home/ankit/Videos/bake/<wbr class="">source/pybindgen/pybindgen/<wbr class="">castxmlparser.py", line 1522, in _register_container</div><div class="">    element_type = traits.element_type(<wbr class="">definition)</div><div class="">  File "build/bdist.linux-x86_64/egg/<wbr class="">pygccxml/declarations/<wbr class="">container_traits.py", line 494, in element_type</div><div class="">  File "build/bdist.linux-x86_64/egg/<wbr class="">pygccxml/declarations/<wbr class="">container_traits.py", line 484, in __find_xxx_type</div><div class="">RuntimeError: Unable to find out list '::std::list<ns3::ArpCache::<wbr class="">Entry *, std::allocator<ns3::ArpCache::<wbr class="">Entry *> >' key\value type.</div></div><div class=""><font size="1" class=""><br class=""></font></div><div class="">Similarly, it fails with</div><div class=""><br class=""></div><div class="">RuntimeError: Unable to find out map '::std::map<std::basic_string<<wbr class="">char>, ns3::LogComponent *, std::less<std::basic_string<<wbr class="">char> >, std::allocator<std::pair<const std::basic_string<char>, ns3::LogComponent *> > >' key\value type.<br class=""></div><div class=""><br class=""></div><div class="">Am I missing something regarding such containers? Please advise.</div><div class=""><br class=""></div><div class="">I am sorry if I was unable to explain everything clearly.</div><div class=""><br class=""></div><div class="">[1] <a href="https://github.com/gjcarneiro/pybindgen" target="_blank" class="">https://github.com/<wbr class="">gjcarneiro/pybindgen</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Ankit Deepak</div></div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">CastXML mailing list<br class=""><a href="mailto:CastXML@public.kitware.com" class="">CastXML@public.kitware.com</a><br class="">http://public.kitware.com/mailman/listinfo/castxml<br class=""></div></blockquote></div><br class=""></div></body></html>