You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
665 B
30 lines
665 B
/* libzt.i */ |
|
|
|
%begin |
|
%{ |
|
#define SWIG_PYTHON_CAST_MODE |
|
%} |
|
|
|
%include <stdint.i> |
|
|
|
#define PYTHON_BUILD 1 |
|
|
|
%module libzt |
|
%{ |
|
#include "../include/ZeroTier.h" |
|
#include "../include/ZeroTierConstants.h" |
|
%} |
|
|
|
%define %cs_callback(TYPE, CSTYPE) |
|
%typemap(ctype) TYPE, TYPE& "void *" |
|
%typemap(in) TYPE %{ $1 = ($1_type)$input; %} |
|
%typemap(in) TYPE& %{ $1 = ($1_type)&$input; %} |
|
%typemap(imtype, out="IntPtr") TYPE, TYPE& "CSTYPE" |
|
%typemap(cstype, out="IntPtr") TYPE, TYPE& "CSTYPE" |
|
%typemap(csin) TYPE, TYPE& "$csinput" |
|
%enddef |
|
|
|
%cs_callback(userCallbackFunc, CSharpCallback) |
|
|
|
%include "../include/ZeroTier.h" |
|
%include "../include/ZeroTierConstants.h"
|
|
|