Commits

Armin Rigo committed d63ff72

Port the trick from pypysig_getaddr_occurred() to the two other functions
(which were not used far).

Comments (0)

Files changed (2)

rpython/translator/c/src/signals.c

     return (void *)(&pypysig_counter); 
 }
 
+#undef pypysig_get_occurred
+long pypysig_get_occurred(void)
+{
+    return pypysig_counter.value;
+}
+
+#undef pypysig_set_occurred
+void pypysig_set_occurred(long nvalue)
+{
+    pypysig_counter.value = nvalue;
+}
+
+
 void pypysig_ignore(int signum)
 {
 #ifdef SA_RESTART

rpython/translator/c/src/signals.h

    use macros when compiling as a stand-alone program, but still
    export a function with the correct name for testing */
 void *pypysig_getaddr_occurred(void);
+long pypysig_get_occurred(void);
+void pypysig_set_occurred(long);
 #define pypysig_getaddr_occurred()   ((void *)(&pypysig_counter))
-
-static long pypysig_get_occurred(void) { return pypysig_counter.value; }
-static void pypysig_set_occurred(long value) { pypysig_counter.value = value; }
+#define pypysig_get_occurred()       (pypysig_counter.value)
+#define pypysig_set_occurred(nv)     (pypysig_counter.value = nv)
 
 #endif