hammer/src/bindings/dotnet/hammer.i

45 lines
1.2 KiB
OpenEdge ABL
Raw Normal View History

2013-12-09 13:54:23 +01:00
%module hammer;
2013-12-16 15:52:24 +01:00
%include "stdint.i"
// Special attention needs to be paid to:
// h_parse
// h_token
// h_in
// h_not_in
//%typemap(cstype) uint8_t* "byte[]"
//%typemap(csin, pre="unsafe { fixed(byte* temp$csinput = &$csinput[0]) {", terminator="}}") uint8_t* "(IntPtr)temp$csinput"
//%typemap(csvarin) uint8_t
2013-12-16 18:47:42 +01:00
%typemap(imtype) uint8_t* "IntPtr"
2013-12-16 15:52:24 +01:00
%typemap(cstype) uint8_t* "IntPtr"
%typemap(csin) uint8_t* "$csinput"
%typemap(csvarout) uint8_t* %{
get {
return $imcall;
}
%}
2013-12-16 18:47:42 +01:00
%typemap(imtype) void*[] "IntPtr"
%typemap(cstype) void*[] "IntPtr"
%typemap(csin) void*[] "$csinput"
2013-12-16 15:52:24 +01:00
%ignore h_bit_writer_get_buffer;
2013-12-19 18:40:59 +01:00
//%apply (char *STRING, size_t LENGTH) {(uint8_t* str, size_t len)};
//%apply (uint8_t* str, size_t len) {(const uint8_t* input, size_t length)}
//%apply (uint8_t* str, size_t len) {(const uint8_t* str, const size_t len)}
//%apply (uint8_t* str, size_t len) {(const uint8_t* charset, size_t length)}
2013-12-16 15:52:24 +01:00
%typemap(csclassmodifiers) SWIGTYPE "internal class";
%csmethodmodifiers "internal";
2013-12-19 18:40:59 +01:00
%extend HCountedArray_ {
HParsedToken* at(unsigned int posn) {
if (posn >= $self->used)
return NULL;
return $self->elements[posn];
}
}
2013-12-09 13:54:23 +01:00
%include "../swig/hammer.i";