(API Change) Remove pointers from all typedefs

Typedef pointers are unsafe.  If you do:
typedef struct bla *bla_t;
then you cannot use it as a constant, such as: const bla_t, because
that constant will be to the pointer itself rather than to the
underlying data.  I admit this was a fundamental mistake that must
be corrected.

All typedefs that were pointer types will now have their pointers
removed from the type itself, and the pointers will be used when they
are actually used as variables/parameters/returns instead.

This does not break ABI though, which is pretty nice.
This commit is contained in:
jp9000
2014-09-25 17:44:05 -07:00
parent 4a06960188
commit c9df41c1e2
146 changed files with 3105 additions and 3079 deletions

View File

@@ -1,8 +1,8 @@
#include <obs-module.h>
struct test_filter {
obs_source_t source;
gs_effect_t whatever;
obs_source_t *source;
gs_effect_t *whatever;
};
static const char *filter_getname(void)
@@ -24,7 +24,7 @@ static void filter_destroy(void *data)
}
}
static void *filter_create(obs_data_t settings, obs_source_t source)
static void *filter_create(obs_data_t *settings, obs_source_t *source)
{
struct test_filter *tf = bzalloc(sizeof(struct test_filter));
char *effect_file;
@@ -47,7 +47,7 @@ static void *filter_create(obs_data_t settings, obs_source_t source)
return tf;
}
static void filter_render(void *data, gs_effect_t effect)
static void filter_render(void *data, gs_effect_t *effect)
{
struct test_filter *tf = data;
obs_source_process_filter(tf->source, tf->whatever, 0, 0, GS_RGBA,