2014-06-25 14:02:12 +01:00
|
|
|
%include "std_string.i"
|
2014-06-26 19:20:10 +01:00
|
|
|
%include "stdint.i"
|
2015-08-07 13:27:19 -06:00
|
|
|
%include "upm_exception.i"
|
2014-06-25 14:02:12 +01:00
|
|
|
|
2018-01-08 11:36:05 -08:00
|
|
|
/* Additional swig file w/helper macros to import (but not expose) */
|
|
|
|
%import "_upm.i"
|
|
|
|
|
2017-04-19 13:49:17 -07:00
|
|
|
%{
|
|
|
|
#include "version.hpp"
|
|
|
|
%}
|
|
|
|
%include "version.hpp"
|
|
|
|
|
2015-11-18 14:50:22 +02:00
|
|
|
%apply int { speed_t };
|
|
|
|
%apply int { mraa_result_t };
|
|
|
|
%apply int { mraa::Result };
|
2016-12-20 10:17:40 -07:00
|
|
|
%apply int { upm_result_t };
|
2015-02-19 08:56:43 -05:00
|
|
|
|
|
|
|
#if (SWIG_JAVASCRIPT_V8)
|
|
|
|
%{
|
|
|
|
// Because there's no guarantee that v8 will ever call garbage collection,
|
|
|
|
// we're adding a function that will allow a user to call it manually
|
|
|
|
void cleanUp()
|
|
|
|
{
|
|
|
|
// Call the v8 garbage collector as long as there is memory to clean up
|
|
|
|
// See https://codereview.chromium.org/412163003 for this API change
|
|
|
|
#if (SWIG_V8_VERSION < 0x032838)
|
|
|
|
while (!v8::V8::IdleNotification())
|
|
|
|
#else
|
|
|
|
while (!v8::Isolate::GetCurrent()->IdleNotification(1000))
|
|
|
|
#endif
|
|
|
|
{;}
|
|
|
|
}
|
|
|
|
%}
|
|
|
|
void cleanUp();
|
|
|
|
#endif
|
2015-09-07 19:00:30 +03:00
|
|
|
|
|
|
|
#if (SWIGJAVA)
|
2015-12-23 17:47:26 +02:00
|
|
|
%typemap(jtype) jobject runnable "java.lang.Runnable"
|
|
|
|
%typemap(jstype) jobject runnable "java.lang.Runnable"
|
2015-09-07 19:00:30 +03:00
|
|
|
#endif
|
2016-11-03 13:54:22 -06:00
|
|
|
|
|
|
|
// Disable nested struct warnings
|
|
|
|
#pragma SWIG nowarn=312,325
|