I have an enum
in C:
type.h
typedef enum{one, two, three=0x0}numbers;
work(numbers* param);
generate.i
%module swig
%{
#include "type.h"
%}
%include "type.h"
swig generates wierd SWIGTYPE_p_numbers
class. How to use it? How to pass it as parameter in function?
EDIT:
swig.java
public class swig {
public static void work(SWIGTYPE_p_numbers param){
swigJNI.work(SWIGTYPE_p_numbers.getCPtr(param));
}
}
SWIGTYPE_p_numbers.java
public class SWIGTYPE_p_numbers {
private long swigCPtr;
protected SWIGTYPE_p_numbers (long cPtr, boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_numbers () {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_numbers obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}