Author: Remi Meier <remi.me...@gmail.com> Branch: Changeset: r1996:b0d76f59efe5 Date: 2016-11-15 17:18 +0100 http://bitbucket.org/pypy/stmgc/changeset/b0d76f59efe5/
Log: silence flycheck with a fake #include diff --git a/c8/stm/core.c b/c8/stm/core.c --- a/c8/stm/core.c +++ b/c8/stm/core.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif char *stm_object_pages; diff --git a/c8/stm/core.h b/c8/stm/core.h --- a/c8/stm/core.h +++ b/c8/stm/core.h @@ -1,3 +1,9 @@ +#ifndef _STMGC_H +# error "must be compiled via stmgc.c" +# include "../stmgc.h" // silence flymake +#endif + + #define _STM_CORE_H_ #include <stdlib.h> @@ -8,7 +14,6 @@ #include <pthread.h> #include <signal.h> - /************************************************************/ #ifndef STM_GC_NURSERY diff --git a/c8/stm/detach.c b/c8/stm/detach.c --- a/c8/stm/detach.c +++ b/c8/stm/detach.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif #include <errno.h> diff --git a/c8/stm/extra.c b/c8/stm/extra.c --- a/c8/stm/extra.c +++ b/c8/stm/extra.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/finalizer.c b/c8/stm/finalizer.c --- a/c8/stm/finalizer.c +++ b/c8/stm/finalizer.c @@ -1,4 +1,7 @@ - +#ifndef _STM_CORE_H_ +# error "must be compiled via stmgc.c" +# include "core.h" // silence flymake +#endif /* callbacks */ void (*stmcb_light_finalizer)(object_t *); diff --git a/c8/stm/forksupport.c b/c8/stm/forksupport.c --- a/c8/stm/forksupport.c +++ b/c8/stm/forksupport.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/gcpage.c b/c8/stm/gcpage.c --- a/c8/stm/gcpage.c +++ b/c8/stm/gcpage.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif static struct tree_s *tree_prebuilt_objs = NULL; /* XXX refactor */ diff --git a/c8/stm/hash_id.c b/c8/stm/hash_id.c --- a/c8/stm/hash_id.c +++ b/c8/stm/hash_id.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/hashtable.c b/c8/stm/hashtable.c --- a/c8/stm/hashtable.c +++ b/c8/stm/hashtable.c @@ -40,7 +40,7 @@ Inspired by: http://ppl.stanford.edu/papers/podc011-bronson.pdf */ - +#include <stdint.h> uint32_t stm_hashtable_entry_userdata; diff --git a/c8/stm/largemalloc.c b/c8/stm/largemalloc.c --- a/c8/stm/largemalloc.c +++ b/c8/stm/largemalloc.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif /* This contains a lot of inspiration from malloc() in the GNU C Library. diff --git a/c8/stm/list.c b/c8/stm/list.c --- a/c8/stm/list.c +++ b/c8/stm/list.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/marker.c b/c8/stm/marker.c --- a/c8/stm/marker.c +++ b/c8/stm/marker.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/misc.c b/c8/stm/misc.c --- a/c8/stm/misc.c +++ b/c8/stm/misc.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c --- a/c8/stm/nursery.c +++ b/c8/stm/nursery.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif /************************************************************/ diff --git a/c8/stm/pages.c b/c8/stm/pages.c --- a/c8/stm/pages.c +++ b/c8/stm/pages.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif #include <unistd.h> diff --git a/c8/stm/prebuilt.c b/c8/stm/prebuilt.c --- a/c8/stm/prebuilt.c +++ b/c8/stm/prebuilt.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/setup.c b/c8/stm/setup.c --- a/c8/stm/setup.c +++ b/c8/stm/setup.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // for auto-completion #endif #include <signal.h> diff --git a/c8/stm/signal_handler.c b/c8/stm/signal_handler.c --- a/c8/stm/signal_handler.c +++ b/c8/stm/signal_handler.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/smallmalloc.c b/c8/stm/smallmalloc.c --- a/c8/stm/smallmalloc.c +++ b/c8/stm/smallmalloc.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/sync.c b/c8/stm/sync.c --- a/c8/stm/sync.c +++ b/c8/stm/sync.c @@ -5,6 +5,7 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif diff --git a/c8/stm/weakref.c b/c8/stm/weakref.c --- a/c8/stm/weakref.c +++ b/c8/stm/weakref.c @@ -1,5 +1,6 @@ #ifndef _STM_CORE_H_ # error "must be compiled via stmgc.c" +# include "core.h" // silence flymake #endif #define WEAKREF_PTR(wr, sz) ((object_t * TLPREFIX *)(((stm_char *)(wr)) + (sz) - sizeof(void*))) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit