Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

A few minor fixes :) #20

Merged
merged 2 commits into from

2 participants

@Flameeyes

Hi there!

Thanks again for the tag, that helps us a lot. While I was looking at your project I noticed I could improve it a tiny bit, so I made the changes and I'm sending them here :)

They are really minimal, but every bit helps, as they say. They are not worth a new version btw, so you should probably leave them queued for the future.

HTH!
Diego

Flameeyes added some commits
@Flameeyes Flameeyes Mark all variables as static.
Since the whole interface required by Ruby is the Init_* function, the
variables can easily not be exposed as symbols, which reduce the chance of
symbol collisions, the size of the symbol table a the number of resolutions
to the PLT.
cf262a3
@Flameeyes Flameeyes Ignore unix-style native extension as well. 164dabf
@ph7 ph7 merged commit 0f2bc3c into from
@ph7
Owner
ph7 commented

Thanks Diego, this is good code cleanup ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 24, 2011
  1. @Flameeyes

    Mark all variables as static.

    Flameeyes authored
    Since the whole interface required by Ruby is the Init_* function, the
    variables can easily not be exposed as symbols, which reduce the chance of
    symbol collisions, the size of the symbol table a the number of resolutions
    to the PLT.
  2. @Flameeyes
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 5 deletions.
  1. +1 −0  .gitignore
  2. +5 −5 ext/system_timer/system_timer_native.c
View
1  .gitignore
@@ -1,5 +1,6 @@
ext/system_timer/Makefile
ext/system_timer/system_timer_native.bundle
ext/system_timer/system_timer_native.o
+ext/system_timer/system_timer_native.so
rdoc
pkg
View
10 ext/system_timer/system_timer_native.c
@@ -15,15 +15,15 @@
#define MICRO_SECONDS 1000000.0
#define MINIMUM_TIMER_INTERVAL_IN_SECONDS 0.2
-VALUE rb_cSystemTimer;
+static VALUE rb_cSystemTimer;
// Ignore most of this for Rubinius
#ifndef RUBINIUS
-sigset_t original_mask;
-sigset_t sigalarm_mask;
-struct sigaction original_signal_handler;
-struct itimerval original_timer_interval;
+static sigset_t original_mask;
+static sigset_t sigalarm_mask;
+static struct sigaction original_signal_handler;
+static struct itimerval original_timer_interval;
static int debug_enabled = 0;
static void clear_pending_sigalrm_for_ruby_threads();
Something went wrong with that request. Please try again.