Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use type [32]uint8 as type []uint8 #719

Closed
kamphaus opened this issue May 7, 2018 · 0 comments
Closed

Cannot use type [32]uint8 as type []uint8 #719

kamphaus opened this issue May 7, 2018 · 0 comments

Comments

@kamphaus
Copy link
Contributor

kamphaus commented May 7, 2018

typedef unsigned char pcre_uint8;
typedef struct pcre_study_data {
    pcre_uint8 start_bits[32];
} pcre_study_data;
// ...
pcre_study_data sdata;
sdata.start_bits[1] = 42;
const pcre_study_data *study = &sdata;
const pcre_uint8 *p = 0;
p = study->start_bits;
is_eq(*(p+1), 42);

gives the go build error cannot use study[0].start_bits (type [32]pcre_uint8) as type []pcre_uint8 in assignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant