SWIG wrapper: Mark ftdi_version_info.version_str and .snapshot_str read only
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 29 Sep 2011 20:02:20 +0000 (22:02 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 29 Sep 2011 20:02:20 +0000 (22:02 +0200)
Fixes this warning:
Warning 451: Setting a const char * variable may leak memory.

bindings/ftdi.i

index 2903924..ace244b 100644 (file)
@@ -10,6 +10,9 @@
 %ignore ftdi_write_data_async;
 %ignore ftdi_async_complete;
 
+%immutable ftdi_version_info::version_str;
+%immutable ftdi_version_info::snapshot_str;
+
 %include ftdi.h
 %{
 #include <ftdi.h>