Home | History | Annotate | Download | only in src
      1 %include "std_string.i"
      2 %include "stdint.i"
      3 %include "upm_exception.i"
      4 
      5     /* %include "arrays_java.i"; */
      6     /* %apply unsigned char[] {uint8_t *mama}; */
      7     %apply int { speed_t };
      8     %apply int { mraa_result_t };
      9     %apply int { mraa::Result };
     10 
     11 #if (SWIG_JAVASCRIPT_V8)
     12 %{
     13 	// Because there's no guarantee that v8 will ever call garbage collection,
     14 	// we're adding a function that will allow a user to call it manually
     15 	void cleanUp()
     16 	{
     17 		// Call the v8 garbage collector as long as there is memory to clean up
     18 		// See https://codereview.chromium.org/412163003 for this API change
     19 #if (SWIG_V8_VERSION < 0x032838)
     20 		while (!v8::V8::IdleNotification())
     21 #else
     22 		while (!v8::Isolate::GetCurrent()->IdleNotification(1000))
     23 #endif
     24 		{;}
     25 	}
     26 %}
     27 void cleanUp();
     28 #endif
     29 
     30 #if (SWIGJAVA)
     31 #endif
     32