-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from Shopify/pz-instrument-float-bug
Instrument float bug
- Loading branch information
1 parent
db8ebd1
commit 901e41c
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "usage.h" | ||
|
||
static VALUE cLiquidUsage; | ||
static ID id_increment; | ||
|
||
void usage_increment(const char *name) | ||
{ | ||
VALUE name_str = rb_str_new_cstr(name); | ||
rb_funcall(cLiquidUsage, id_increment, 1, name_str); | ||
} | ||
|
||
void init_liquid_usage() | ||
{ | ||
cLiquidUsage = rb_const_get(mLiquid, rb_intern("Usage")); | ||
rb_global_variable(&cLiquidUsage); | ||
|
||
id_increment = rb_intern("increment"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef LIQUID_USAGE_H | ||
#define LIQUID_USAGE_H | ||
|
||
#include "liquid.h" | ||
|
||
void init_liquid_usage(); | ||
void usage_increment(const char *name); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters