(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:
@@ -48,7 +48,7 @@ static inline GLenum get_attachment(enum gs_zstencil_format format)
|
||||
return 0;
|
||||
}
|
||||
|
||||
gs_zstencil_t device_zstencil_create(gs_device_t device, uint32_t width,
|
||||
gs_zstencil_t *device_zstencil_create(gs_device_t *device, uint32_t width,
|
||||
uint32_t height, enum gs_zstencil_format format)
|
||||
{
|
||||
struct gs_zstencil_buffer *zs;
|
||||
@@ -67,7 +67,7 @@ gs_zstencil_t device_zstencil_create(gs_device_t device, uint32_t width,
|
||||
return zs;
|
||||
}
|
||||
|
||||
void gs_zstencil_destroy(gs_zstencil_t zs)
|
||||
void gs_zstencil_destroy(gs_zstencil_t *zs)
|
||||
{
|
||||
if (zs) {
|
||||
if (zs->buffer) {
|
||||
|
Reference in New Issue
Block a user