summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/external_C_code/struct_field_adaptation.h
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/userguide/external_C_code/struct_field_adaptation.h')
-rw-r--r--docs/examples/userguide/external_C_code/struct_field_adaptation.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/examples/userguide/external_C_code/struct_field_adaptation.h b/docs/examples/userguide/external_C_code/struct_field_adaptation.h
new file mode 100644
index 000000000..ca55460f4
--- /dev/null
+++ b/docs/examples/userguide/external_C_code/struct_field_adaptation.h
@@ -0,0 +1,13 @@
+typedef struct {
+ int field1;
+ int field2;
+ int newly_added_field;
+} StructType;
+
+static StructType global_struct;
+
+static StructType *get_struct_ptr() {
+ return &global_struct;
+}
+
+#define C_LIB_VERSION 20