SWIG wrapper: Mark ftdi_version_info.version_str and .snapshot_str read only
[libftdi] / bindings / ftdi.i
index ce1149c..ace244b 100644 (file)
 %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>
 %}
 
+%include ftdi_i.h
+%{
+#include <ftdi_i.h>
+%}
+
 extern "C" {
 
 %apply char *OUTPUT { unsigned char *buf };
@@ -41,12 +49,12 @@ extern "C" {
 %clear unsigned short *status;
 
 %apply char *OUTPUT { unsigned char *output };
-    int  ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output);
+    int  ftdi_eeprom_build(struct ftdi_context *ftdi);
 %clear unsigned char *output;
 
 %apply char *OUTPUT { unsigned char *eeprom };
-    int ftdi_read_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom);
-    int ftdi_write_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom);
+    int ftdi_read_eeprom(struct ftdi_context *ftdi);
+    int ftdi_write_eeprom(struct ftdi_context *ftdi);
 %clear unsigned char *eeprom;
 
 %apply int *OUTPUT { unsigned int *chipid };