Open glaubitz opened 5 months ago
I think they meant to call PyReturnError here. https://github.com/nima/python-dmidecode/blob/master/src/dmierror.h#L48 The signature matches with what's being passed as arguments.
I think they meant to call PyReturnError here. https://github.com/nima/python-dmidecode/blob/master/src/dmierror.h#L48 The signature matches with what's being passed as arguments.
Nope, PyReturnError()
is a macro that contains a return
instruction and would end the execution __dmidecode_xml_getsection()
prematurely so that the following call to free()
would be missed.
Right. Well, at least I guess
NULL, 0
should become __FILE__, __LINE__
Right. Well, at least I guess NULL, 0 should become FILE, LINE
Those are place holders in the macro and not local variables to the function
__dmidecode_xml_getsection
.
Those are standard macros that evaluate to file name and line.
hisshadow@uberlaptop ~ $ cat 2.c
__FILE__
__LINE__
hisshadow@uberlaptop ~ $ gcc -E 2.c
# 0 "2.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "2.c"
"2.c"
2
Fixes the following error:
~