crystalruby 0.1.7 → 0.1.8
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/crystalruby/typemaps.rb +49 -49
- data/lib/crystalruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95d9eecc4d47a8d9f83417779c6174eea95ebeea593e5127a89b6cfbc7884664
|
4
|
+
data.tar.gz: b4f241f826e4f2b6c704bda0fd01c201e79a9bc26027bd4702717fd371687650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d98f1e4a671679cfb8d9da45298954e01def202802bd5a64db9d0d9cba08de0776971d031648642f402fe0310d741dc6b2d163253884ad25082298226c1be1a0
|
7
|
+
data.tar.gz: 141658885f763ca3088a7058131e7227434920d6213e755e21f85d6bb4d68a062a2a3163127f4e9f0db03a8c9a27a0549837714b38789647028075cc3b77660c
|
data/README.md
CHANGED
data/lib/crystalruby/typemaps.rb
CHANGED
@@ -1,63 +1,63 @@
|
|
1
1
|
module CrystalRuby
|
2
2
|
module Typemaps
|
3
3
|
CRYSTAL_TYPE_MAP = {
|
4
|
-
:
|
5
|
-
:
|
6
|
-
:
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
4
|
+
char: "Int8", # In Crystal, :char is typically represented as Int8
|
5
|
+
uchar: "UInt8", # Unsigned char
|
6
|
+
int8: "Int8", # Same as :char
|
7
|
+
uint8: "UInt8", # Same as :uchar
|
8
|
+
short: "Int16", # Short integer
|
9
|
+
ushort: "UInt16", # Unsigned short integer
|
10
|
+
int16: "Int16", # Same as :short
|
11
|
+
uint16: "UInt16", # Same as :ushort
|
12
|
+
int: "Int32", # Integer, Crystal defaults to 32 bits
|
13
|
+
uint: "UInt32", # Unsigned integer
|
14
|
+
int32: "Int32", # 32-bit integer
|
15
|
+
uint32: "UInt32", # 32-bit unsigned integer
|
16
|
+
long: "Int32 | Int64", # Long integer, size depends on the platform (32 or 64 bits)
|
17
|
+
ulong: "UInt32 | UInt64", # Unsigned long integer, size depends on the platform
|
18
|
+
int64: "Int64", # 64-bit integer
|
19
|
+
uint64: "UInt64", # 64-bit unsigned integer
|
20
|
+
long_long: "Int64", # Same as :int64
|
21
|
+
ulong_long: "UInt64", # Same as :uint64
|
22
|
+
float: "Float32", # Floating point number (single precision)
|
23
|
+
double: "Float64", # Double precision floating point number
|
24
|
+
bool: "Bool", # Boolean type
|
25
|
+
void: "Void", # Void type
|
26
|
+
string: "String" # String type
|
27
27
|
}
|
28
28
|
|
29
29
|
ERROR_VALUE = {
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
51
|
-
:
|
52
|
-
:
|
30
|
+
char: "0", # In Crystal, :char is typically represented as Int8
|
31
|
+
uchar: "0", # Unsigned char
|
32
|
+
int8: "0", # Same as :char
|
33
|
+
uint8: "0", # Same as :uchar
|
34
|
+
short: "0", # Short integer
|
35
|
+
ushort: "0", # Unsigned short integer
|
36
|
+
int16: "0", # Same as :short
|
37
|
+
uint16: "0", # Same as :ushort
|
38
|
+
int: "0", # Integer, Crystal defaults to 32 bits
|
39
|
+
uint: "0", # Unsigned integer
|
40
|
+
int32: "0", # 32-bit integer
|
41
|
+
uint32: "0", # 32-bit unsigned integer
|
42
|
+
long: "0", # Long integer, size depends on the platform (32 or 64 bits)
|
43
|
+
ulong: "0", # Unsigned long integer, size depends on the platform
|
44
|
+
int64: "0", # 64-bit integer
|
45
|
+
uint64: "0", # 64-bit unsigned integer
|
46
|
+
long_long: "0", # Same as :int64
|
47
|
+
ulong_long: "0", # Same as :uint64
|
48
|
+
float: "0.0", # Floating point number (single precision)
|
49
|
+
double: "0.0", # Double precision floating point number
|
50
|
+
bool: "false", # Boolean type
|
51
|
+
void: "Void", # Void type
|
52
|
+
string: '"".to_unsafe' # String type
|
53
53
|
}
|
54
54
|
|
55
55
|
C_TYPE_MAP = CRYSTAL_TYPE_MAP.merge({
|
56
|
-
|
57
|
-
|
56
|
+
string: "UInt8*"
|
57
|
+
})
|
58
58
|
|
59
59
|
C_TYPE_CONVERSIONS = {
|
60
|
-
:
|
60
|
+
string: {
|
61
61
|
from: "String.new(%s)",
|
62
62
|
to: "%s.to_unsafe"
|
63
63
|
}
|
data/lib/crystalruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crystalruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wouter Coppieters
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: digest
|