Skip to content

Commit a3a5568

Browse files
authored
Merge pull request #3508 from Starbuck5/remove-unused-code2
Remove unused code in mask/alphablit
2 parents efd5615 + fc8c849 commit a3a5568

File tree

4 files changed

+1
-28
lines changed

4 files changed

+1
-28
lines changed

src_c/alphablit.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ blit_blend_premultiplied(SDL_BlitInfo *info);
6161
static int
6262
SoftBlitPyGame(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst,
6363
SDL_Rect *dstrect, int blend_flags);
64-
extern int
65-
SDL_RLESurface(SDL_Surface *surface);
66-
extern void
67-
SDL_UnRLESurface(SDL_Surface *surface, int recode);
6864

6965
static int
7066
SoftBlitPyGame(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst,

src_c/include/pygame_mask.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,4 @@ typedef struct {
2929

3030
#define pgMask_AsBitmap(x) (((pgMaskObject *)x)->mask)
3131

32-
#ifndef PYGAMEAPI_MASK_INTERNAL
33-
34-
#include "pgimport.h"
35-
36-
PYGAMEAPI_DEFINE_SLOTS(mask);
37-
38-
#define pgMask_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mask, 0))
39-
#define pgMask_Check(x) ((x)->ob_type == &pgMask_Type)
40-
41-
#define import_pygame_mask() _IMPORT_PYGAME_MODULE(mask)
42-
43-
#endif /* ~PYGAMEAPI_MASK_INTERNAL */
44-
4532
#endif /* ~PGMASK_H */

src_c/mask.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,8 +2667,7 @@ static PyMethodDef _mask_methods[] = {
26672667

26682668
MODINIT_DEFINE(mask)
26692669
{
2670-
PyObject *module, *apiobj;
2671-
static void *c_api[PYGAMEAPI_MASK_NUMSLOTS];
2670+
PyObject *module;
26722671

26732672
static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT,
26742673
"mask",
@@ -2720,13 +2719,5 @@ MODINIT_DEFINE(mask)
27202719
return NULL;
27212720
}
27222721

2723-
/* export the c api */
2724-
c_api[0] = &pgMask_Type;
2725-
apiobj = encapsulate_api(c_api, "mask");
2726-
if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) {
2727-
Py_XDECREF(apiobj);
2728-
Py_DECREF(module);
2729-
return NULL;
2730-
}
27312722
return module;
27322723
}

src_c/mask.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
#define PGMASK_INTERNAL_H
33

44
#include "include/pygame_mask.h"
5-
#define PYGAMEAPI_MASK_NUMSLOTS 1
65

76
#endif /* ~PGMASK_INTERNAL_H */

0 commit comments

Comments
 (0)