Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ale
imms
Commits
d18a8c6f
Commit
d18a8c6f
authored
Oct 13, 2013
by
ale
Browse files
add method to deserialize Features
parent
c4ca66f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
imms-go/imms.go
View file @
d18a8c6f
...
...
@@ -31,6 +31,11 @@ type Features struct {
ptr
C
.
imms_features_t
}
func
NewFeaturesFromData
(
data
[]
byte
)
*
Features
{
bufPtr
:=
(
*
C
.
char
)(
unsafe
.
Pointer
(
&
data
[
0
]))
return
&
Features
{
C
.
imms_features_from_data
(
bufPtr
,
C
.
int
(
len
(
data
)))}
}
func
(
f
*
Features
)
Data
()
[]
byte
{
n
:=
C
.
imms_features_data_size
()
buf
:=
make
([]
byte
,
n
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment