Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Danfuzz node 8 #1

Merged
merged 2 commits into from

1 participant

@danfuzz

Switch to node-gyp.

Dan Bornstein added some commits
Dan Bornstein Convert to `node-gyp`. 7605f5d
Dan Bornstein Fix warning.
Signed vs. unsigned.
06bd69f
@danfuzz danfuzz merged commit e9a78bc into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 4, 2012
  1. Convert to `node-gyp`.

    Dan Bornstein authored
  2. Fix warning.

    Dan Bornstein authored
    Signed vs. unsigned.
This page is out of date. Refresh to see the latest.
View
2  .gitignore
@@ -1,4 +1,2 @@
-.lock-wscript
-.waf*
build
oidNative.node
View
8 binding.gyp
@@ -0,0 +1,8 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'oidNative',
+ 'sources': [ 'src/oidNative.cc' ],
+ }
+ ]
+}
View
4 package.json
@@ -1,6 +1,6 @@
{
"name": "oid",
- "version": "0.4.6",
+ "version": "0.5.0",
"keywords":
["object", "id", "identity", "hash", "hashcode", "objid", "oid"],
"description":
@@ -31,7 +31,7 @@
},
"scripts": {
- "install": "node-waf configure build",
+ "install": "node-gyp configure build; mkdir -p bin; mv build/Release/*.node bin",
"test": "node test/test.js"
}
}
View
2  src/oidNative.cc
@@ -57,7 +57,7 @@ Handle<Value> NumberIdHash(const Arguments& args) {
hood.doubleValue = num->Value();
int hash = 56081; // A prime number.
- for (int i = 0; i < sizeof(double); i++) {
+ for (size_t i = 0; i < sizeof(double); i++) {
hash = (hash * 31) + hood.buffer[i];
}
View
39 wscript
@@ -1,39 +0,0 @@
-# Build script based on examples from the NodeJS docs and
-# from node-rsa
-
-import Options
-import shutil
-from os import chmod, mkdir
-from os.path import exists
-
-srcdir = '.'
-blddir = 'build'
-VERSION = '0.0.1'
-
-def set_options(opt):
- opt.tool_options('compiler_cxx')
-
-def configure(conf):
- conf.check_tool('compiler_cxx')
- conf.check_tool('node_addon')
-
-def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
- obj.target = 'oidNative'
- obj.source = 'src/oidNative.cc'
-
-def shutdown():
- dir = 'bin'
- target = 'oidNative.node'
- dirTarget = dir + '/' + target
- if Options.commands['clean']:
- if exists(dir): shutil.rmtree(dir)
- if exists('build'): shutil.rmtree('build')
- if Options.commands['build']:
- if not exists(dir): mkdir(dir)
- if exists('build/default/' + target):
- shutil.copyfile('build/default/' + target, dirTarget)
- if exists('build/Release/' + target):
- shutil.copyfile('build/Release/' + target, dirTarget)
- if exists(dirTarget):
- chmod(dirTarget, 0755)
Something went wrong with that request. Please try again.