From 00f280ff9d1662a6589ebe0b7ee7ecc222535d41 Mon Sep 17 00:00:00 2001 From: jpark37 Date: Mon, 20 Jan 2020 21:44:50 -0800 Subject: [PATCH] libobs: Rename DEPRECATED to OBS_DEPRECATED Avoid collisions with other libraries that define DEPRECATED. --- libobs/obs-encoder.c | 2 ++ libobs/obs-properties.h | 2 +- libobs/obs.c | 3 ++- libobs/obs.h | 8 ++++---- libobs/util/c99defs.h | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libobs/obs-encoder.c b/libobs/obs-encoder.c index 309727b59..506c770f0 100644 --- a/libobs/obs-encoder.c +++ b/libobs/obs-encoder.c @@ -1309,12 +1309,14 @@ void obs_encoder_packet_create_instance(struct encoder_packet *dst, memcpy(dst->data, src->data, src->size); } +/* OBS_DEPRECATED */ void obs_duplicate_encoder_packet(struct encoder_packet *dst, const struct encoder_packet *src) { obs_encoder_packet_create_instance(dst, src); } +/* OBS_DEPRECATED */ void obs_free_encoder_packet(struct encoder_packet *packet) { obs_encoder_packet_release(packet); diff --git a/libobs/obs-properties.h b/libobs/obs-properties.h index b3aac8072..32e33b6e5 100644 --- a/libobs/obs-properties.h +++ b/libobs/obs-properties.h @@ -397,7 +397,7 @@ EXPORT enum obs_group_type obs_property_group_type(obs_property_t *p); EXPORT obs_properties_t *obs_property_group_content(obs_property_t *p); #ifndef SWIG -DEPRECATED +OBS_DEPRECATED EXPORT enum obs_text_type obs_proprety_text_type(obs_property_t *p); #endif diff --git a/libobs/obs.c b/libobs/obs.c index 03289e02c..f01b81718 100644 --- a/libobs/obs.c +++ b/libobs/obs.c @@ -1656,7 +1656,7 @@ gs_effect_t *obs_get_base_effect(enum obs_base_effect effect) return NULL; } -/* DEPRECATED */ +/* OBS_DEPRECATED */ gs_effect_t *obs_get_default_rect_effect(void) { if (!obs) @@ -1678,6 +1678,7 @@ proc_handler_t *obs_get_proc_handler(void) return obs->procs; } +/* OBS_DEPRECATED */ void obs_render_main_view(void) { if (!obs) diff --git a/libobs/obs.h b/libobs/obs.h index da0e1ee9f..cccae2236 100644 --- a/libobs/obs.h +++ b/libobs/obs.h @@ -630,7 +630,7 @@ EXPORT gs_effect_t *obs_get_base_effect(enum obs_base_effect effect); #ifndef SWIG /* DEPRECATED: gets texture_rect default effect */ -DEPRECATED +OBS_DEPRECATED EXPORT gs_effect_t *obs_get_default_rect_effect(void); #endif @@ -642,7 +642,7 @@ EXPORT proc_handler_t *obs_get_proc_handler(void); #ifndef SWIG /** Renders the main view */ -DEPRECATED +OBS_DEPRECATED EXPORT void obs_render_main_view(void); #endif @@ -2037,11 +2037,11 @@ EXPORT uint32_t obs_encoder_get_caps(const obs_encoder_t *encoder); #ifndef SWIG /** Duplicates an encoder packet */ -DEPRECATED +OBS_DEPRECATED EXPORT void obs_duplicate_encoder_packet(struct encoder_packet *dst, const struct encoder_packet *src); -DEPRECATED +OBS_DEPRECATED EXPORT void obs_free_encoder_packet(struct encoder_packet *packet); #endif diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h index 2f602ba61..f84432aa3 100644 --- a/libobs/util/c99defs.h +++ b/libobs/util/c99defs.h @@ -24,10 +24,10 @@ #define UNUSED_PARAMETER(param) (void)param #ifdef _MSC_VER -#define DEPRECATED __declspec(deprecated) +#define OBS_DEPRECATED __declspec(deprecated) #define FORCE_INLINE __forceinline #else -#define DEPRECATED __attribute__((deprecated)) +#define OBS_DEPRECATED __attribute__((deprecated)) #define FORCE_INLINE inline __attribute__((always_inline)) #endif -- GitLab