CAIRO_STATUS_SUCCESS becomes CAIRO_INT_STATUS_NO_MEMORY ?
Mihai Moldovan
ionic at ionic.de
Thu Mar 20 22:05:29 UTC 2025
* On 3/20/25 18:26, Konstantin KABASSANOV wrote:
> Even if _cairo_tor_scan_converter_add_polygon returns the only value it could
> return (CAIRO_STATUS_SUCCESS), the composite_polygon status variable gets
> CAIRO_INT_STATUS_NO_MEMORY…
>
> Could it be a somehow wrong mapping between cairo_status_t and
> cairo_int_status_t types values? It seems that the numerical value in memory
> corresponding to the status variable changes to 0x01 and if I print the value
> casted to both types, I can see CAIRO_INT_STATUS_NO_MEMORY in GDB…
I've only quickly looked at the code, but no.
Both structs are enums and match up for the first values.
Are you absolutely sure that you're looking at the correct function?
mono_scan_converter_allocate_edges() can and does return CAIRO_STATUS_NO_MEMORY
for instance.
Are you sure that your compiler is not optimizing out stuff, that leaves you
bewildered, even though the end result is probably sane? (try -O0
-fno-omit-frame-pointer -g3 -ggdb3 -gdwarf-4)
Mihai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.cairographics.org/archives/cairo/attachments/20250320/3fe22195/attachment.sig>
More information about the cairo
mailing list