Skip to content

Commit 8d28c57

Browse files
committed
Use *_data_pointer() to get pointer to "state"
Increases function coverage of functions and makes the bindings more future-proof.
1 parent b48ff58 commit 8d28c57

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

bindings/amplifier.swg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ typedef struct Amp {
7272
}
7373
/* install shortcuts */
7474
r->caps = r->amp->caps;
75-
r->state = &r->amp->state;
75+
r->state = amp_data_pointer(r->amp, RIG_PTRX_AMPSTATE);
7676
r->do_exception = 0; /* default is disabled */
7777
r->error_status = RIG_OK;
7878
return r;

bindings/rig.swg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin
485485
#endif
486486
/* install shortcuts */
487487
r->caps = r->rig->caps;
488-
r->state = &r->rig->state;
488+
r->state = rig_data_pointer(r->rig, RIG_PTRX_STATE);
489489
r->do_exception = 0; /* default is disabled */
490490
r->error_status = RIG_OK;
491491

bindings/rotator.swg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typedef struct Rot {
6868
}
6969
/* install shortcuts */
7070
r->caps = r->rot->caps;
71-
r->state = &r->rot->state;
71+
r->state = &r->rot->state; rot_data_pointer(r->rot, RIG_PTRX_ROTSTATE);
7272
r->do_exception = 0; /* default is disabled */
7373
r->error_status = RIG_OK;
7474
return r;

0 commit comments

Comments
 (0)