Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

SocketListener::accept_async panics #99

Closed
antoyo opened this issue Apr 2, 2018 · 6 comments
Closed

SocketListener::accept_async panics #99

antoyo opened this issue Apr 2, 2018 · 6 comments

Comments

@antoyo
Copy link
Member

antoyo commented Apr 2, 2018

Hi.
The current SocketListener::accept_async method does not work because the Object parameter of the callback should be optional (and the .gir file says so) but it is not.
It might be because gir does not look at the optional attribute when generating the callback.

@EPashkin
Copy link
Member

EPashkin commented Apr 2, 2018

Gir don't look at this attribute at all, only at allow-none but don't trusts him too, as many cases when it wrong.
In current realization of async trampoline IMHO will be touchcomplicated adding standard config checking as trampoline not analyzed.

@sdroege
Copy link
Member

sdroege commented Apr 2, 2018

For the async trampoline we should maybe reverse the rules and assume by default that everything can be NULL unless overridden.

The problem basically is that GIR annotations exist only for "this can be NULL", but it can be easily forgotten in C libraries so the absence of that attribute does not necessarily mean that it must not be NULL / can't be NULL. So for return values we always assume that they can be NULL unless overridden in the toml file, for arguments we assume they must not be NULL unless the attribute is set (or overridden in the toml file).
What would help is a "this can not be NULL" annotation for return values.

@sdroege
Copy link
Member

sdroege commented Apr 4, 2018

For now maybe just implement this specific function manually?

@sdroege
Copy link
Member

sdroege commented Jun 19, 2019

@antoyo What's the status here? Is there still a problem, and if so can you provide a testcase to reproduce it?

@sdroege
Copy link
Member

sdroege commented Jun 19, 2019

It is. Fixing

@sdroege
Copy link
Member

sdroege commented Jun 19, 2019

See #221

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

No branches or pull requests

3 participants