From ca610f91d5483e19bfdae88bb0094973cc81fc95 Mon Sep 17 00:00:00 2001 From: "Sanford Rockowitz (/shared/home/rock/dot_gitconfig)" Date: Sat, 17 Feb 2024 19:10:20 -0500 Subject: [PATCH] reinstall deprecated ddca_create_display_ref(), bump version allows old clients to build --- configure.ac | 2 +- src/libmain/api_displays.c | 23 ----------------------- src/public/ddcutil_c_api.h | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index c308fc651..54e1e1653 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ AC_PREREQ([2.69]) m4_define([ddcutil_major_version], [2]) m4_define([ddcutil_minor_version], [1]) -m4_define([ddcutil_micro_version], [3]) +m4_define([ddcutil_micro_version], [4]) dnl ddcutil_version_suffix does not begin with hyphen, e.g. "dev", not "-dev" m4_define([ddcutil_version_suffix], [""]) # m4_ifelse(ddcutil_version_suffix,[], m4_define([ddcutil_version], [a]),define([ddcutil_version],[b])) diff --git a/src/libmain/api_displays.c b/src/libmain/api_displays.c index 777864fb8..5870c872d 100644 --- a/src/libmain/api_displays.c +++ b/src/libmain/api_displays.c @@ -307,30 +307,8 @@ ddca_get_display_ref( } -#ifdef REMOVED -/** @deprecated use #ddca_get_display_ref() - * Gets a display reference for a display identifier. - * Normally, this is a permanently allocated #DDCA_Display_Ref - * created by monitor detection and does not need to be freed. - * Use #ddca_free_display_ref() to safely free. - * - * @param[in] did display identifier - * @param[out] dref_loc where to return display reference - * @retval 0 success - * @retval DDCRC_ARG did is not a valid display identifier handle - * @retval DDCRC_INVALID_DISPLAY display not found - * - * @ingroup api_display_spec - */ -// __attribute__ ((deprecated ("use ddca_get_display_ref()"))) -DDCA_Status -ddca_create_display_ref( - DDCA_Display_Identifier did, - DDCA_Display_Ref* dref_loc); -#endif -#ifdef REMOVED // deprecated DDCA_Status ddca_create_display_ref( @@ -339,7 +317,6 @@ ddca_create_display_ref( { return ddca_get_display_ref(did, dref_loc); } -#endif #ifdef REMOVED /** @deprecated All display references are persistent diff --git a/src/public/ddcutil_c_api.h b/src/public/ddcutil_c_api.h index c2d9feeec..701af719e 100644 --- a/src/public/ddcutil_c_api.h +++ b/src/public/ddcutil_c_api.h @@ -731,6 +731,27 @@ ddca_did_repr( // Display Reference // +/** @deprecated use #ddca_get_display_ref() + * Gets a display reference for a display identifier. + * Normally, this is a permanently allocated #DDCA_Display_Ref + * created by monitor detection and does not need to be freed. + * Use #ddca_free_display_ref() to safely free. + * + * @param[in] did display identifier + * @param[out] dref_loc where to return display reference + * @retval 0 success + * @retval DDCRC_ARG did is not a valid display identifier handle + * @retval DDCRC_INVALID_DISPLAY display not found + * + * @ingroup api_display_spec + */ +// __attribute__ ((deprecated ("use ddca_get_display_ref()"))) +DDCA_Status +ddca_create_display_ref( + DDCA_Display_Identifier did, + DDCA_Display_Ref* dref_loc); + + /** Gets a display reference for a display identifier. * This is a permanently allocated #DDCA_Display_Ref * created by monitor detection and does not need to be freed.