Skip to content

Commit 9724c02

Browse files
committed
Split off base declarations to base.h, and remove static linkage for future unit test purposes
1 parent 50f3474 commit 9724c02

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src_c/base.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
pygame-ce - Python Game Library
34
Copyright (C) 2000-2001 Pete Shinners
@@ -269,7 +270,7 @@ pg_get_sdl_version(PyObject *self, PyObject *args, PyObject *kwargs)
269270
SDL_VERSION(&version);
270271
#endif
271272

272-
char *keywords[] = {"linked", NULL};
273+
static char *keywords[] = {"linked", NULL};
273274

274275
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", keywords, &linked)) {
275276
return NULL; /* Exception already set. */
@@ -1196,15 +1197,15 @@ _pg_buffer_is_byteswapped(Py_buffer *view)
11961197
switch (view->format[0]) {
11971198
case '<':
11981199
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
1199-
/* Use macros to make analyzer happy */
1200+
/* Use macros to make static analyzer happy */
12001201
return 0;
12011202
#else
12021203
return 1;
12031204
#endif
12041205
case '>':
12051206
case '!':
12061207
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
1207-
/* Use macros to make analyzer happy */
1208+
/* Use macros to make static analyzer happy */
12081209
return 0;
12091210
#else
12101211
return 1;
@@ -2011,7 +2012,7 @@ pygame_parachute(int sig)
20112012
#endif
20122013
}
20132014

2014-
int fatal_signals[] = {
2015+
static int fatal_signals[] = {
20152016
SIGSEGV,
20162017
#ifdef SIGBUS
20172018
SIGBUS,
@@ -2083,7 +2084,7 @@ load_submodule(const char *parent, PyObject *mod, const char *alias);
20832084

20842085
/* bind functions to python */
20852086

2086-
PyMethodDef _base_methods[] = {
2087+
static PyMethodDef _base_methods[] = {
20872088
{"init", (PyCFunction)pg_init, METH_NOARGS, DOC_INIT},
20882089
{"quit", (PyCFunction)pg_quit, METH_NOARGS, DOC_QUIT},
20892090
{"get_init", (PyCFunction)pg_base_get_init, METH_NOARGS, DOC_GETINIT},

0 commit comments

Comments
 (0)