Kris Thielemans
2014-11-18 02:37:53 UTC
Hi all
I have a problem with typenames emitted when using
% feature("autodoc", "1");
In some cases, the C++ typenames are used, which really isn't appropriate
for the target language. However,
Confusingly this doesn't happen all the time. For instance, when generating
Python, I can get for one class
get_exam_info(...)
get_exam_info() -> stir::shared_ptr< stir::ExamInfo >
set_exam_info(...)
set_exam_info(ExamInfo arg2)
In this example, this difference occurs between an argument and a return
value, but this isn't always the case. I've had a look at the code that
generates the autodoc but am not sure how to fix this.
On a possibly related note, the autodoc also (sometimes?) generates C++
types for built-in types like this
set_num_detector_layers(...)
set_num_detector_layers(int const & new_num)
anyone any idea how to fix this? The relevant code always looks like this
Node *nn = classLookup(type);
type_str = nn ? Copy(Getattr(nn, "sym:name")) :
SwigType_str(type, 0);
so, presumably, in some case the classLookup fails.
If need be, I can try to come up with a small example of course.
Kris
PS: I'm using swig 3.0.3. should I check with current master?
I have a problem with typenames emitted when using
% feature("autodoc", "1");
In some cases, the C++ typenames are used, which really isn't appropriate
for the target language. However,
Confusingly this doesn't happen all the time. For instance, when generating
Python, I can get for one class
get_exam_info(...)
get_exam_info() -> stir::shared_ptr< stir::ExamInfo >
set_exam_info(...)
set_exam_info(ExamInfo arg2)
In this example, this difference occurs between an argument and a return
value, but this isn't always the case. I've had a look at the code that
generates the autodoc but am not sure how to fix this.
On a possibly related note, the autodoc also (sometimes?) generates C++
types for built-in types like this
set_num_detector_layers(...)
set_num_detector_layers(int const & new_num)
anyone any idea how to fix this? The relevant code always looks like this
Node *nn = classLookup(type);
type_str = nn ? Copy(Getattr(nn, "sym:name")) :
SwigType_str(type, 0);
so, presumably, in some case the classLookup fails.
If need be, I can try to come up with a small example of course.
Kris
PS: I'm using swig 3.0.3. should I check with current master?