Python wizards: Fix a compatibility with "old" pythons scripts, after commit 21fde9b6.

Temporary fix until a full python API exists.
This commit is contained in:
jean-pierre charras 2021-05-02 16:06:11 +02:00
parent aee1593678
commit a6ad7a4a70
1 changed files with 15 additions and 1 deletions

View File

@ -29,13 +29,27 @@
%include board_item.h // generate code for this interface
/* Only for compatibility with old python scipts: */
const int S_SEGMENT = (const int)PCB_SHAPE_TYPE::SEGMENT;
const int S_RECT = (const int)PCB_SHAPE_TYPE::RECT;
const int S_ARC = (const int)PCB_SHAPE_TYPE::ARC;
const int S_CIRCLE = (const int)PCB_SHAPE_TYPE::CIRCLE;
const int S_POLYGON = (const int)PCB_SHAPE_TYPE::POLYGON;
const int S_CURVE = (const int)PCB_SHAPE_TYPE::CURVE;
%rename(Get) operator BOARD_ITEM*;
%{
#include <board_item.h>
/* for compatibility with old python scipts: */
const int S_SEGMENT = (const int)PCB_SHAPE_TYPE::SEGMENT;
const int S_RECT = (const int)PCB_SHAPE_TYPE::RECT;
const int S_ARC = (const int)PCB_SHAPE_TYPE::ARC;
const int S_CIRCLE = (const int)PCB_SHAPE_TYPE::CIRCLE;
const int S_POLYGON = (const int)PCB_SHAPE_TYPE::POLYGON;
const int S_CURVE = (const int)PCB_SHAPE_TYPE::CURVE;
%}