Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd67d6f

Browse files
committed
SF patch #475657 (Dietmar Schwertberger)
RISCOS/Makefile: include structseq and weakrefobject; changes to keep command line length below 2048 RISCOS/Modules/riscosmodule.c: typos from the stat structseq patch Include/pyport.h: don't re-#define __attribute__(__x) on RISC OS as it is already defined in c library
1 parent 3abca12 commit bd67d6f

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

Include/pyport.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,10 @@ typedef struct fd_set {
453453
/*
454454
* Hide GCC attributes from compilers that don't support them.
455455
*/
456-
#if !defined(__GNUC__) || __GNUC__ < 2 || \
457-
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) || \
458-
defined(NEXT)
456+
#if (!defined(__GNUC__) || __GNUC__ < 2 || \
457+
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) || \
458+
defined(NEXT) ) && \
459+
!defined(RISCOS)
459460
#define __attribute__(__x)
460461
#endif
461462

RISCOS/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ DLKLIB = $(LIBSROOT).dlk
99
ZLIB = $(LIBSROOT).zlib
1010
EXPAT = $(LIBSROOT).expat.lib
1111

12-
OBJSCAN = $(DLKLIB).objscan
13-
MAKEDLK = $(DLKLIB).makedlk
12+
OBJSCAN = objscan
13+
MAKEDLK = makedlk
1414

1515
# change from time to time (don't forget to change !Boot also)
1616
TARGET=Python22
17-
BUILD=23
17+
BUILD=25
1818

1919

2020
#
@@ -164,7 +164,9 @@ OBJECTS_OBJECTS =\
164164
@.^.Objects.o.abstract\
165165
@.^.Objects.o.unicodectype\
166166
@.^.Objects.o.unicodeobject\
167-
@.^.Objects.o.descrobject
167+
@.^.Objects.o.descrobject\
168+
@.^.Objects.o.weakrefobject\
169+
@.^.Objects.o.structseq
168170

169171

170172
OBJECTS_PARSER =\
@@ -418,6 +420,7 @@ rebuild: clean clean-support
418420
-wipe @.^.Lib.*/pyd ~C ~V
419421
-wipe @.^.Lib.plat-riscos.*/pyd ~C~V
420422
remove s.linktab
423+
remove @.^.LibPython
421424

422425
clean-support:
423426
-wipe @.^.!* ~C~V

RISCOS/Modules/riscosmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "unixstuff.h"
88

99
#include "Python.h"
10+
#include "structseq.h"
1011

1112
#include <errno.h>
1213

@@ -142,7 +143,7 @@ static PyStructSequence_Field stat_result_fields[] = {
142143
{ "st_ctime", "time of last change" },
143144
{ "st_ftype", "file type" },
144145
{ "st_attrs", "attributes" },
145-
{ "st_obtype", "object type" }
146+
{ "st_obtype", "object type" },
146147
{ 0 }
147148
};
148149

@@ -194,7 +195,7 @@ static PyObject *riscos_stat(PyObject *self,PyObject *args)
194195
PyStructSequence_SET_ITEM(v, 11,
195196
PyInt_FromLong((long) at)); /*attributes*/
196197
PyStructSequence_SET_ITEM(v, 12,
197-
PyInt_FromLong((long) ot)); /*object type*/
198+
PyInt_FromLong((long) ob)); /*object type*/
198199

199200
if (PyErr_Occurred()) {
200201
Py_DECREF(v);

0 commit comments

Comments
 (0)