Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

C code cleanups + cdrom/overlay removal#3014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ankith26 merged 3 commits intopygame:mainfromStarbuck5:c-code-cleanups
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletionsdocs/reST/c_api/cdrom.rst
View file
Open in desktop

This file was deleted.

6 changes: 3 additions & 3 deletionssrc_c/_camera.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1770,7 +1770,7 @@ camera_dealloc(PyObject *self)
#else
free(((pgCameraObject *)self)->device_name);
#endif
PyObject_DEL(self);
PyObject_Free(self);
}
/*
PyObject* camera_getattr(PyObject* self, char* attrname) {
Expand DownExpand Up@@ -1832,7 +1832,7 @@ Camera(pgCameraObject *self, PyObject *arg)
if (!PyArg_ParseTuple(arg, "s|(ii)s", &dev_name, &w, &h, &color))
return NULL;

cameraobj =PyObject_NEW(pgCameraObject, &pgCamera_Type);
cameraobj =PyObject_New(pgCameraObject, &pgCamera_Type);

if (cameraobj) {
cameraobj->device_name =
Expand DownExpand Up@@ -1894,7 +1894,7 @@ Camera(pgCameraObject *self, PyObject *arg)
"Couldn't find a camera with that name");
}

cameraobj =PyObject_NEW(pgCameraObject, &pgCamera_Type);
cameraobj =PyObject_New(pgCameraObject, &pgCamera_Type);

if (color) {
if (!strcmp(color, "YUV")) {
Expand Down
5 changes: 0 additions & 5 deletionssrc_c/_pygame.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -249,10 +249,6 @@ supported Python version. #endif */
if (!SDL_WasInit(SDL_INIT_VIDEO)) \
return RAISE(pgExc_SDLError, "video system not initialized")

#define CDROM_INIT_CHECK() \
if (!SDL_WasInit(SDL_INIT_CDROM)) \
return RAISE(pgExc_SDLError, "cdrom system not initialized")

#define JOYSTICK_INIT_CHECK() \
if (!SDL_WasInit(SDL_INIT_JOYSTICK)) \
return RAISE(pgExc_SDLError, "joystick system not initialized")
Expand DownExpand Up@@ -319,7 +315,6 @@ struct pgColorObject {
#define PYGAMEAPI_PIXELARRAY_NUMSLOTS 2
#define PYGAMEAPI_COLOR_NUMSLOTS 5
#define PYGAMEAPI_MATH_NUMSLOTS 2
#define PYGAMEAPI_CDROM_NUMSLOTS 2
#define PYGAMEAPI_BASE_NUMSLOTS 24
#define PYGAMEAPI_EVENT_NUMSLOTS 6

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp