spec_type options disappearing
Opened this issue · 1 comments
Deleted user commented
For what is basically an implementation of strdup() I tried to apply the spectype.xml file, however the free($0) call will be cleared and never appears in the generated test code. And on that same note, neither does the additional #include <stdlib.h>
. As far as I read the examples, this is what it supposed to work like, right?
<collection>
<spec_type>
<kind>
normal
</kind>
<data_type>
char *
</data_type>
<constraint>
$0!=NULL&&strcmp($0,$1)==0
</constraint>
<final_code>
free($0);
</final_code>
<global_code>
free($0);
</global_code>
<associating>
<interfaces>
dup_string
</interfaces>
<links>
retval
</links>
</associating>
</spec_type>
<spec_type>
<data_type>
const char *
</data_type>
<decl_code>
const char *s = "test input";
</decl_code>
<associating>
<interfaces>
dup_string
</interfaces>
<links>
param1
</links>
</associating>
</spec_type>
</collection>
aponomarenko commented
Hello.
Thanks for reporting issues.
Could you please attach the input data and exact command line to reproduce the issue?
Thank you.