Browse Source

SDL_Surface: don't implicitly declare struct SDL_BlitMap.

It's just an opaque type, but it's more clear to have it typedef'd outside
the containing struct.

Fixes #5828.
Ryan C. Gordon 3 years ago
parent
commit
ff735b3c0f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      include/SDL_surface.h

+ 3 - 1
include/SDL_surface.h

@@ -61,6 +61,8 @@ extern "C" {
  */
  */
 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
 
 
+typedef struct SDL_BlitMap SDL_BlitMap;  /* this is an opaque type. */
+
 /**
 /**
  * \brief A collection of pixels used in software blitting.
  * \brief A collection of pixels used in software blitting.
  *
  *
@@ -88,7 +90,7 @@ typedef struct SDL_Surface
     SDL_Rect clip_rect;         /**< Read-only */
     SDL_Rect clip_rect;         /**< Read-only */
 
 
     /** info for fast blit mapping to other surfaces */
     /** info for fast blit mapping to other surfaces */
-    struct SDL_BlitMap *map;    /**< Private */
+    SDL_BlitMap *map;           /**< Private */
 
 
     /** Reference count -- used when freeing surface */
     /** Reference count -- used when freeing surface */
     int refcount;               /**< Read-mostly */
     int refcount;               /**< Read-mostly */