mirror of
https://github.com/Hamlib/Hamlib
synced 2026-08-13 17:32:05 -04:00
Mark some data as private and not safe for applications
The pointers may move, or the method to get the address may change.
This commit is contained in:
parent
4b42f98078
commit
b01914aa3c
2 changed files with 20 additions and 0 deletions
|
|
@ -115,6 +115,13 @@
|
|||
%ignore PRIfreq;
|
||||
%ignore SCNfreq;
|
||||
|
||||
// Private HAMLIB data
|
||||
%ignore cache_addr;
|
||||
%ignore rigport_addr;
|
||||
%ignore pttport_addr;
|
||||
%ignore dcdport_addr;
|
||||
%ignore state_addr;
|
||||
|
||||
// others
|
||||
%rename("$ignore", regexmatch$name="python_callbacks") ""; // internal structs and methods used by bindings
|
||||
%ignore rig_state::cache; // deprecated
|
||||
|
|
|
|||
|
|
@ -98,6 +98,14 @@
|
|||
#define HL_DEPRECATED
|
||||
#endif
|
||||
|
||||
// Macro to mark function or variable as private to HAMLIB
|
||||
// and unsafe for application use
|
||||
#if __has_c_attribute(deprecated) && !defined(IN_HAMLIB)
|
||||
#define HL_PRIVATE [[deprecated("HAMLIB private data")]]
|
||||
#else
|
||||
#define HL_PRIVATE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup rig
|
||||
* @{
|
||||
|
|
@ -2675,10 +2683,15 @@ struct s_rig {
|
|||
/* Data after this line is for hamlib internal use only,
|
||||
* and should *NOT* be referenced by applications, as layout will change!
|
||||
*/
|
||||
HL_PRIVATE
|
||||
struct rig_cache *cache_addr; /*!< address of rig_cache buffer */
|
||||
HL_PRIVATE
|
||||
hamlib_port_t *rigport_addr; /*!< address of rig control (CAT) port struct */
|
||||
HL_PRIVATE
|
||||
hamlib_port_t *pttport_addr; /*!< address of PTT control port struct */
|
||||
HL_PRIVATE
|
||||
hamlib_port_t *dcdport_addr; /*!< address of DCD control port struct */
|
||||
HL_PRIVATE
|
||||
struct rig_state *state_addr; /*!< address of rig_state struct */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue