File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ What's New in Stackless 3.X.X?
99
1010*Release date: 20XX-XX-XX*
1111
12+ - https://github.com/stackless-dev/stackless/issues/140
13+ Fix bugs in prickelpit.c unwrap_frame_arg() and slp_find_execname().
14+
15+ - https://github.com/stackless-dev/stackless/issues/138
16+ Correctly propose Stackless calls for C-functions.
17+
1218- https://bitbucket.org/stackless-dev/stackless/issues/129
1319 C-API: Calling PyTasklet_New( NULL, ...) no longer crashes.
1420
Original file line number Diff line number Diff line change @@ -679,11 +679,23 @@ do { \
679679} while(0)
680680
681681/* ditto, without incref. Made no sense to optimize. */
682+ #if defined(__GNUC__ ) && defined(__STDC__ ) && (__STDC_VERSION__ >= 199901L )
683+ #define SLP_DISABLE_GCC_W_ADDRESS \
684+ _Pragma("GCC diagnostic push") \
685+ _Pragma("GCC diagnostic ignored \"-Waddress\"")
686+ #define SLP_RESTORE_WARNINGS \
687+ _Pragma("GCC diagnostic pop")
688+ #else
689+ #define SLP_DISABLE_GCC_W_ADDRESS /**/
690+ #define SLP_RESTORE_WARNINGS /**/
691+ #endif
682692
683693#define TASKLET_SETVAL_OWN (task , val ) \
684694do { \
685695 PyObject *hold = (task)->tempval; \
696+ SLP_DISABLE_GCC_W_ADDRESS /* suppress warning, if val == Py_NONE */ \
686697 assert (val != NULL); \
698+ SLP_RESTORE_WARNINGS \
687699 (task )-> tempval = (PyObject * ) val ; \
688700 Py_DECREF (hold ); \
689701} while (0 )
Original file line number Diff line number Diff line change @@ -236,7 +236,11 @@ unwrap_frame_arg(PyObject * args) {
236236 int is_instance ;
237237 Py_ssize_t len , i ;
238238
239- if (!PyTuple_Check (args ) || (len = PyTuple_Size (args )) < 1 ) {
239+ if (!PyTuple_Check (args )) {
240+ Py_INCREF (args );
241+ return args ;
242+ }
243+ if ((len = PyTuple_Size (args )) < 1 ) {
240244 if (len < 0 )
241245 return NULL ;
242246 Py_INCREF (args );
@@ -500,6 +504,8 @@ slp_find_execname(PyFrameObject *f, int *valid)
500504 PyObject * dic = dp ? dp -> dict : NULL ;
501505 PyObject * exec_addr = PyLong_FromVoidPtr (f -> f_execute );
502506
507+ assert (valid != NULL );
508+
503509 if (exec_addr == NULL ) return NULL ;
504510 exec_name = dic ? PyDict_GetItem (dic , exec_addr ) : NULL ;
505511 if (exec_name == NULL ) {
@@ -508,7 +514,7 @@ slp_find_execname(PyFrameObject *f, int *valid)
508514 sprintf (msg , "frame exec function at %lx is not registered!" ,
509515 (unsigned long )(void * )f -> f_execute );
510516 PyErr_SetString (PyExc_ValueError , msg );
511- valid = 0 ;
517+ * valid = 0 ;
512518 }
513519 else {
514520 PyFrame_ExecFunc * good , * bad ;
@@ -517,7 +523,7 @@ slp_find_execname(PyFrameObject *f, int *valid)
517523 goto err_exit ;
518524 }
519525 if (f -> f_execute == bad )
520- valid = 0 ;
526+ * valid = 0 ;
521527 else if (f -> f_execute != good ) {
522528 PyErr_SetString (PyExc_SystemError ,
523529 "inconsistent c?frame function registration" );
You can’t perform that action at this time.
0 commit comments