pvpgn-twilight 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Changes CHANGED
@@ -46,4 +46,8 @@ Version 0.2.2
46
46
  - Added some macros for quick exporting to ruby
47
47
 
48
48
  Version 0.2.3
49
- - Test release
49
+ - Test release
50
+
51
+ Version 0.2.4
52
+ - Various fixes
53
+ - New macro's
@@ -1,2 +1,5 @@
1
1
  require 'pvpgn'
2
- puts PVPGN::BNHash('hello') #will hash to: 2e0236a3649381fe99cdce4b5b59adffa3167c7b
2
+ #puts 'PVPGN Gem Version:' + PVPGN::Version
3
+ puts 'the following will hash to 2e0236a3649381fe99cdce4b5b59adffa3167c7b:'
4
+ puts 'hello -> ' + PVPGN::BNHash('hello') #will hash to: 2e0236a3649381fe99cdce4b5b59adffa3167c7b
5
+ puts 'HELLO -> ' + PVPGN::BNHash('HELLO') #will hash to: 2e0236a3649381fe99cdce4b5b59adffa3167c7b
@@ -1,6 +1,6 @@
1
1
  #define PVPGN_TWILIGHT_VERSION "0.2.3"
2
2
  #define PVPGN_TWILIGHT_MODULE "PVPGN"
3
- //#define __TEST__
3
+ #define __TEST__ 0
4
4
  /**************************************************/
5
5
  /*/ /*/
6
6
  /*/ Comments & Notes /*/
@@ -14,7 +14,7 @@
14
14
  linux/ruby linkage bug
15
15
  */
16
16
 
17
- #ifdef __TEST__
17
+ #if ( __TEST__ )
18
18
  #include <stdio.h>
19
19
  #else
20
20
  //#include "d2bitstream.h"
@@ -40,7 +40,11 @@
40
40
  //Register a variable arg func for a class
41
41
  #define RUBY_RegisterClassFunc(c,x) rb_define_method(c,#x,x,-1)
42
42
  //Register a set arg func for a class
43
- #define RUBY_RegisterClassFunc(c,x,a) rb_define_method(c,#x,x,a)
43
+ #define RUBY_RegisterClassFuncEx(c,x,a) rb_define_method(c,#x,x,a)
44
+ //Register a global variable
45
+ #define RUBY_RegisterGlobalVariable(x,y) rb_define_global_const(#x,y)
46
+ //Register a Module Variable
47
+ #define RUBY_RegisterVariable(x,y) rb_define_const(RUBY_Module,#x,y)
44
48
 
45
49
 
46
50
  /**************************************************/
@@ -313,10 +317,10 @@ static char* PVPGN_CreateHash(char* pHash, signed int nSize, char pHashOut[41])
313
317
  UTILITY_HexToText(&pHashOut[i * 8],dwHash[i],0);
314
318
  }
315
319
 
316
- return pHashOut;
320
+ return &pHashOut[0];
317
321
  }
318
322
 
319
- #ifdef __TEST__
323
+ #if ( __TEST__ )
320
324
  /**************************************************/
321
325
  /*/ /*/
322
326
  /*/ Testing /*/
@@ -368,6 +372,7 @@ void Init_pvpgn()
368
372
  VALUE RUBY_Module;
369
373
 
370
374
  RUBY_Module = rb_define_module(PVPGN_TWILIGHT_MODULE);
375
+ RUBY_RegisterVariable(Version,rb_str_new2(PVPGN_TWILIGHT_VERSION));
371
376
  RUBY_RegisterFunc(BNHash);
372
377
  }
373
378
  #endif
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{pvpgn-twilight}
3
- s.version = "0.2.3"
3
+ s.version = "0.2.4"
4
4
  s.date = %q{2010-02-04}
5
5
  s.authors = ["Lorenzo 'Necrolis' Boccetti"]
6
6
  s.email = %q{necrolis@gamil.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pvpgn-twilight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenzo 'Necrolis' Boccetti