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

[Ruby] Fix mismatched pointer type (#17240) #17326

Merged
merged 1 commit into from
Jul 3, 2024
Merged

[Ruby] Fix mismatched pointer type (#17240) #17326

merged 1 commit into from
Jul 3, 2024

Conversation

zhangskz
Copy link
Member

@zhangskz zhangskz commented Jul 3, 2024

Cherry-pick of 0aa7449

This PR fixes the following error on windows ruby 3.4 (head):

current directory:
D:/a/sass-embedded-host-ruby/sass-embedded-host-ruby/vendor/bundle/ruby/3.4.0+0/gems/google-protobuf-4.27.1/ext/google/protobuf_c
make.exe DESTDIR\= sitearchdir\=./.gem.20240623-6612-4umz58
sitelibdir\=./.gem.20240623-6612-4umz58
generating protobuf_c-x64-mingw-ucrt.def
compiling protobuf.c
compiling convert.c
compiling defs.c
defs.c: In function 'MethodDescriptor_initialize':
defs.c:1513:19: error: assignment to 'const upb_MethodDef *' from incompatible
pointer type 'const upb_ServiceDef *' [-Wincompatible-pointer-types]
 1513 |   self->methoddef = (const upb_ServiceDef*)NUM2ULL(ptr);
      |                   ^
make: *** [Makefile:250: defs.o] Error 1

make failed, exit code 2

Closes #17240

COPYBARA_INTEGRATE_REVIEW=#17240 from ntkme:fix-ruby-upb-pointer-type 22e9859 PiperOrigin-RevId: 648923147

This PR fixes the following error on windows ruby 3.4 (head):

```
current directory:
D:/a/sass-embedded-host-ruby/sass-embedded-host-ruby/vendor/bundle/ruby/3.4.0+0/gems/google-protobuf-4.27.1/ext/google/protobuf_c
make.exe DESTDIR\= sitearchdir\=./.gem.20240623-6612-4umz58
sitelibdir\=./.gem.20240623-6612-4umz58
generating protobuf_c-x64-mingw-ucrt.def
compiling protobuf.c
compiling convert.c
compiling defs.c
defs.c: In function 'MethodDescriptor_initialize':
defs.c:1513:19: error: assignment to 'const upb_MethodDef *' from incompatible
pointer type 'const upb_ServiceDef *' [-Wincompatible-pointer-types]
 1513 |   self->methoddef = (const upb_ServiceDef*)NUM2ULL(ptr);
      |                   ^
make: *** [Makefile:250: defs.o] Error 1

make failed, exit code 2
```

- Closes #17266

Closes #17240

COPYBARA_INTEGRATE_REVIEW=#17240 from ntkme:fix-ruby-upb-pointer-type 22e9859
PiperOrigin-RevId: 648923147
@zhangskz zhangskz requested a review from a team as a code owner July 3, 2024 16:25
@zhangskz zhangskz requested review from ericsalo and removed request for a team July 3, 2024 16:25
@zhangskz zhangskz merged commit 7592817 into 27.x Jul 3, 2024
172 of 174 checks passed
@zhangskz zhangskz deleted the cp-ruby branch July 3, 2024 19:49
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

Successfully merging this pull request may close these issues.

3 participants