code_junkie

How to expose std::vector<int> as a Python list using SWIG?

Nov 12th, 2011
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. std::vector<int> get_match_stats();
  2.  
  3. SWIG Version 1.3.36
  4.  
  5. %template(IntVector) vector<int>;
  6.  
  7. %template(IntVector) vector<int>;
  8.  
  9. %include "myvector.h"
  10.  
  11.  
  12. %{
  13. # include "myvector.h"
  14. %}
  15.  
  16. %include "myvector.h"
  17.  
  18.  
  19. %{
  20. # include "myvector.h"
  21. %}
  22.  
  23. %include "myvector.h"
  24.  
  25.  
  26. %{
  27. # include "myvector.h"
  28. %}
  29.  
  30. %include "myvector.h"
  31.  
  32.  
  33. %{
  34. # include "myvector.h"
  35. %}
Add Comment
Please, Sign In to add comment