Skip to content
This repository

A few minor fixes :) #20

Merged
merged 2 commits into from over 2 years ago

2 participants

Diego Elio Pettenò Philippe Hanrigou
Diego Elio Pettenò

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
Diego Elio Pettenò 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
Diego Elio Pettenò Flameeyes Ignore unix-style native extension as well. 164dabf
Philippe Hanrigou ph7 merged commit 0f2bc3c into from
Philippe Hanrigou ph7 closed this
Philippe Hanrigou
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

Showing 2 unique commits by 1 author.

Dec 24, 2011
Diego Elio Pettenò 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
Diego Elio Pettenò Flameeyes Ignore unix-style native extension as well. 164dabf
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 6 additions and 5 deletions. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +5 5 ext/system_timer/system_timer_native.c
1  .gitignore
... ... @@ -1,5 +1,6 @@
1 1 ext/system_timer/Makefile
2 2 ext/system_timer/system_timer_native.bundle
3 3 ext/system_timer/system_timer_native.o
  4 +ext/system_timer/system_timer_native.so
4 5 rdoc
5 6 pkg
10 ext/system_timer/system_timer_native.c
@@ -15,15 +15,15 @@
15 15 #define MICRO_SECONDS 1000000.0
16 16 #define MINIMUM_TIMER_INTERVAL_IN_SECONDS 0.2
17 17
18   -VALUE rb_cSystemTimer;
  18 +static VALUE rb_cSystemTimer;
19 19
20 20 // Ignore most of this for Rubinius
21 21 #ifndef RUBINIUS
22 22
23   -sigset_t original_mask;
24   -sigset_t sigalarm_mask;
25   -struct sigaction original_signal_handler;
26   -struct itimerval original_timer_interval;
  23 +static sigset_t original_mask;
  24 +static sigset_t sigalarm_mask;
  25 +static struct sigaction original_signal_handler;
  26 +static struct itimerval original_timer_interval;
27 27 static int debug_enabled = 0;
28 28
29 29 static void clear_pending_sigalrm_for_ruby_threads();

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.