Skip to content
Snippets Groups Projects
Commit eba8ecc6 authored by Meredith L. Patterson's avatar Meredith L. Patterson Committed by Dan Hirsch
Browse files

typemap to fix conversion from python strings to uint8_t*

parent 4bd2fc9e
No related branches found
No related tags found
No related merge requests found
%module hammer
%include "typemaps.i"
%include "stdint.i"
%include "typemaps.i"
%apply char [ANY] { uint8_t [ANY] };
#if defined(SWIGPYTHON)
%typemap(in) uint8_t* {
$1 = (uint8_t*)PyString_AsString($input);
}
#else
#warning no "in" typemap defined
#endif
// 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.
%{
......@@ -12,5 +21,5 @@
%include "allocator.h"
%include "hammer.h"
%apply const char* { const uint8_t* }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment