2013-11-16 07:56:47 +01:00
|
|
|
%module hammer
|
|
|
|
|
|
2013-11-17 15:55:38 -06:00
|
|
|
%include "stdint.i"
|
2013-11-18 17:19:46 -06:00
|
|
|
%include "typemaps.i"
|
|
|
|
|
%apply char [ANY] { uint8_t [ANY] };
|
|
|
|
|
|
|
|
|
|
#if defined(SWIGPYTHON)
|
|
|
|
|
%typemap(in) uint8_t* {
|
|
|
|
|
$1 = (uint8_t*)PyString_AsString($input);
|
|
|
|
|
}
|
2013-11-18 21:14:44 -06:00
|
|
|
%typemap(out) uint8_t* {
|
|
|
|
|
$result = PyString_FromString((char*)$1);
|
|
|
|
|
}
|
2013-11-18 17:19:46 -06:00
|
|
|
#else
|
2013-11-18 21:14:44 -06:00
|
|
|
#warning no uint8_t* typemaps defined
|
2013-11-18 17:19:46 -06:00
|
|
|
#endif
|
2013-11-17 15:55:38 -06:00
|
|
|
|
|
|
|
|
// All the include paths are relative to the build, i.e., ../../. If you need to build these manually (i.e., not with scons), keep that in mind.
|
2013-11-16 20:24:05 +01:00
|
|
|
%{
|
|
|
|
|
#include "allocator.h"
|
|
|
|
|
#include "hammer.h"
|
|
|
|
|
#include "internal.h"
|
|
|
|
|
%}
|
|
|
|
|
%include "allocator.h"
|
|
|
|
|
%include "hammer.h"
|
|
|
|
|
|
2013-11-18 17:19:46 -06:00
|
|
|
|
2013-11-16 08:12:29 +01:00
|
|
|
|