Browse Source

Fix LSEQ exports in swig

Need to keep it correctly inherited from BASE_SEQ to
be able to iterate over it and have index access
jobs
qu1ck 1 year ago
committed by jean-pierre charras
parent
commit
ff15506d53
  1. 3
      common/swig/kicad.i
  2. 16
      pcbnew/python/swig/layer_ids.i

3
common/swig/kicad.i

@ -117,9 +117,6 @@ principle should be easily implemented by adapting the current STL containers.
// SWIG is incompatible with std::unique_ptr
%ignore GetNewConfig;
// wrapper of BASE_SEQ (see typedef std::vector<PCB_LAYER_ID> BASE_SEQ;)
%template(base_seqVect) std::vector<enum PCB_LAYER_ID>;
// TODO: wrapper of BASE_SET (see std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;)

16
pcbnew/python/swig/layer_ids.i

@ -37,7 +37,18 @@
%ignore GAL_SET::set(int, bool);
%ignore GAL_SET::set(int);
%{
#include <layer_ids.h>
#include <lseq.h>
#include <lset.h>
#include <pcbnew_scripting_helpers.h>
%}
// wrapper of BASE_SEQ (see typedef std::vector<PCB_LAYER_ID> BASE_SEQ;)
%template(base_seqVect) std::vector<enum PCB_LAYER_ID>;
%include layer_ids.h
%include lseq.h
%include lset.h
// Extend LSET by 2 methods to add or remove layers from the layer list
@ -64,8 +75,3 @@
return self.removeLayerSet( layers )
%}
}
%{
#include <layer_ids.h>
#include <lset.h>
#include <pcbnew_scripting_helpers.h>
%}
Loading…
Cancel
Save